dispatch

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildWorkerCommand

func BuildWorkerCommand(bin string, spec Spec) (*exec.Cmd, error)

func FormatResult

func FormatResult(msg ResultMessage) string

func ReclaimClaim

func ReclaimClaim(
	ctx context.Context,
	c *coord.Coord,
	taskID coord.TaskID,
	ttl time.Duration,
) (func() error, error)

func WaitWorkerAbsent

func WaitWorkerAbsent(
	ctx context.Context,
	c *coord.Coord,
	workerAgentID string,
	deadline time.Duration,
) error

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)

type Spec

type Spec struct {
	TaskID        coord.TaskID
	Title         string
	Files         []string
	Thread        string
	ParentAgentID string
	WorkerAgentID string
	WorkspaceDir  string
}

func BuildSpec

func BuildSpec(parentAgentID, workspaceDir string, task coord.Task) (Spec, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL