package resolution import ( mcat "git.novox.be/novox/mesh-sdk/go/catalogue" ) // busyInto composes a container's `busy` into the node-engine's words, or takes it away: for an engine that // reads it, the command and its timeout written out; for one that does not, the field is not sent, and the // container is replaced at once, as before. func busyInto(resource map[string]any, with mcat.Rendering) { if _, has := resource[mcat.BusyField]; !has { return } if !with.ReadsBusy { delete(resource, mcat.BusyField) return } b, _, _ := mcat.ReadBusy(resource) resource[mcat.BusyField] = map[string]any{"command": b.Command, "timeout": b.Timeout.String()} }