Documentation
¶
Index ¶
- func BuildWorkerCommand(bin string, spec Spec) (*exec.Cmd, error)
- func FormatResult(msg ResultMessage) string
- func ReclaimClaim(ctx context.Context, c *coord.Coord, taskID coord.TaskID, ttl time.Duration) (func() error, error)
- func WaitWorkerAbsent(ctx context.Context, c *coord.Coord, workerAgentID string, ...) error
- type ResultKind
- type ResultMessage
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWorkerCommand ¶
BuildWorkerCommand assembles the `bones tasks dispatch worker` invocation with the required flags wired from spec. The parent appends per-result flags (--result, --summary, --claim-from-agent-id) before Start.
Earlier iterations passed these as AGENT_INFRA_* env vars, but the worker's Kong struct never read them — the worker would fail Kong's required-flag validation immediately and the parent would hit its 5s subscribe timeout. Flags-only is the single source of truth.
func FormatResult ¶
func FormatResult(msg ResultMessage) string
func ReclaimClaim ¶
Types ¶
type ResultKind ¶
type ResultKind string
const ( ResultSuccess ResultKind = "success" ResultFork ResultKind = "fork" ResultFail ResultKind = "fail" )
type ResultMessage ¶
type ResultMessage struct {
Kind ResultKind
Summary string
Branch string
Rev string
}
func ParseResult ¶
func ParseResult(body string) (ResultMessage, bool)
Click to show internal directories.
Click to hide internal directories.