Add HTTP API with JSON status endpoint and typeid support

This commit is contained in:
Ian Gulliver
2026-01-24 11:03:34 -08:00
parent 168cdedbcb
commit 9aebe8b83d
13 changed files with 409 additions and 115 deletions

View File

@@ -23,10 +23,11 @@ const (
)
type ArtNetNode struct {
Node *Node
Inputs []int
Outputs []int
LastSeen time.Time
TypeID string `json:"typeid"`
Node *Node `json:"node"`
Inputs []int `json:"inputs,omitempty"`
Outputs []int `json:"outputs,omitempty"`
LastSeen time.Time `json:"last_seen"`
}
func (t *Tendrils) listenArtNet(ctx context.Context, iface net.Interface) {
@@ -217,6 +218,7 @@ func (a *ArtNetNodes) Update(node *Node, inputs, outputs []int) {
existing.LastSeen = time.Now()
} else {
a.nodes[node] = &ArtNetNode{
TypeID: newTypeID("artnetnode"),
Node: node,
Inputs: inputs,
Outputs: outputs,