schedule

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package schedule drives bounded reconciliation to a structural input fixpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher interface {
	Dispatch(context.Context, NodeID, manifest.DrainLevel, Result) Result
	// Sweep permits final classification only when the invocation's work is quiescent.
	// A nonempty result MUST keep the structural boundary open.
	Sweep(context.Context, bool) []NodeID
}

Dispatcher connects execution and publication delivery to the scheduler. SDK embedders implement this seam without exposing their input representation.

type Kind added in v0.7.3

type Kind uint8

Kind is the retained dependency classification of an invocation.

const (
	// Terminal means the invocation has no unresolved dependency.
	Terminal Kind = iota
	// Blocked means an input may still become available.
	Blocked
	// DependencyFailed means a required input failed.
	DependencyFailed
)

type NodeID

type NodeID = manifest.NamedResource

NodeID identifies a schedulable declaration.

type Result added in v0.7.3

type Result struct {
	Assessment assessment
}

Result retains the inputs and outcome of one execution.

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

Scheduler owns execution lifetime and sorted successor admission.

func New

func New(tasks taskService, disp Dispatcher) *Scheduler

New constructs a scheduler borrowing the invocation's bounded task service.

func (*Scheduler) OnArrival

func (s *Scheduler) OnArrival(id NodeID, runnable bool)

OnArrival admits a new runnable declaration through the existing event adapter. Existing executions observe changes through their retained input registrations.

func (*Scheduler) OnPublication added in v0.7.3

func (s *Scheduler) OnPublication()

OnPublication signals the structural boundary through existing publication events.

func (*Scheduler) Results added in v0.7.3

func (s *Scheduler) Results() map[NodeID]Result

Results projects completed accepted assessments after Run has drained.

func (*Scheduler) Run

func (s *Scheduler) Run(ctx context.Context) error

Run drains work, delivers pending heads and settles retained unresolved assessments. Dispatcher, assessment and task-service calls MUST run outside mu.

func (*Scheduler) Seed

func (s *Scheduler) Seed(ids []NodeID)

Seed admits initial declarations in deterministic order.

Jump to

Keyboard shortcuts

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