Documentation
¶
Index ¶
- func BuildOrchestratorContext(name, transport, event string, workspace *WorkspaceContext, ...) map[string]interface{}
- func BuildOrchestratorLabels(name, state string, flags ...string) []string
- func DeliverIntegrationMessage(root, from, to, subject, body string, ctx map[string]interface{}, ...) (string, error)
- type OrchestratorContext
- type WorkspaceContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildOrchestratorContext ¶
func BuildOrchestratorContext(name, transport, event string, workspace *WorkspaceContext, task map[string]interface{}) map[string]interface{}
BuildOrchestratorContext creates a standard orchestrator context object. name is the orchestrator name (e.g. "symphony", "kanban"). transport is "hook" or "bridge". event is the lifecycle event name. workspace contains path/key info (may be nil). task contains task metadata (may be nil).
func BuildOrchestratorLabels ¶
BuildOrchestratorLabels builds the standard label set for integration messages.
Label rules from spec:
- Always: "orchestrator", "orchestrator:<name>"
- When state is known: "task-state:<state>"
- Add "handoff" for review-ready / awaiting-review messages
- Add "blocking" for failed / interrupted / blocked messages
func DeliverIntegrationMessage ¶
func DeliverIntegrationMessage(root, from, to, subject, body string, ctx map[string]interface{}, labels []string, thread, kind, priority string) (string, error)
DeliverIntegrationMessage builds and delivers a standard integration message to the specified recipient's inbox. It uses the same Maildir atomic delivery as the rest of AMQ.
Parameters:
- root: AMQ root directory
- from: sender handle
- to: recipient handle (single; self-delivery for hooks)
- subject: message subject line
- body: markdown body
- ctx: message context (should contain "orchestrator" key)
- labels: message labels
- thread: thread ID (e.g. "task/<workspace_key>")
- kind: message kind (e.g. "status", "todo")
- priority: message priority (e.g. "normal", "low")
Types ¶
type OrchestratorContext ¶
type OrchestratorContext struct {
Version int `json:"version"`
Name string `json:"name"`
Transport string `json:"transport"`
Event string `json:"event"`
Workspace *WorkspaceContext `json:"workspace,omitempty"`
Task map[string]interface{} `json:"task,omitempty"`
}
OrchestratorContext builds the context.orchestrator JSON object used by all integration messages. The returned map is meant to be nested under a "orchestrator" key in the message context.
Spec reference: "All integration metadata lives under context.orchestrator."
type WorkspaceContext ¶
WorkspaceContext describes the workspace portion of orchestrator context.