Documentation
¶
Overview ¶
Package engine wires the deterministic router to native execution and the state store (backlog AO-015): a submitted task auto-routes, is persisted with its matched rule, and runs natively with zero manual assignment. Run events stream into the append-only event log.
Index ¶
- type Engine
- func (e *Engine) AcceptRef(ctx context.Context, t task.Task) (string, string, error)
- func (e *Engine) Cancel(runID string) error
- func (e *Engine) Route(t task.Task) router.RouteDecision
- func (e *Engine) Submit(ctx context.Context, t task.Task) (string, error)
- func (e *Engine) SubmitAndWait(ctx context.Context, t task.Task) (store.Run, error)
- func (e *Engine) SubmitRef(ctx context.Context, t task.Task) (string, string, error)
- func (e *Engine) UsePlacer(p Placer)
- func (e *Engine) Wait(runID string)
- type Placer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine routes and dispatches tasks.
func (*Engine) AcceptRef ¶ added in v0.13.0
AcceptRef persists the routed run and returns its identity before provider startup completes. The accepted run is dispatched exactly once on a detached context; any startup failure lands on that already-visible run.
func (*Engine) Cancel ¶ added in v0.13.0
Cancel stops a live run through the runtime contract and waits until its terminal state and events are persisted. Unknown/already-finished runs are a no-op so a completion racing an operator interrupt remains harmless.
func (*Engine) Route ¶
func (e *Engine) Route(t task.Task) router.RouteDecision
Route returns the routing decision for a task without dispatching it (powers `fort route --dry-run`).
func (*Engine) Submit ¶
Submit routes and dispatches a task, returning the run id immediately. It satisfies inbox.Submitter; callers that need the resolved machine use SubmitRef.
func (*Engine) SubmitAndWait ¶
SubmitAndWait submits a task and blocks until its run terminates, returning the final run row.
func (*Engine) SubmitRef ¶
SubmitRef is Submit that also returns the resolved machine (spec 022). It persists the route decision and a run row, starts native execution, and streams events into the store on a goroutine.