Versions in this module Expand all Collapse all v1 v1.0.0 Aug 26, 2026 Changes in this version + var ErrCommandIDUnavailable = errors.New("control: command ID unavailable") + var ErrDataPlaneUnavailable = errors.New("control: data plane unavailable") + var ErrDesiredRevisionExhausted = errors.New("control: desired-state revision exhausted") + var ErrDesiredTargetMismatch = errors.New("control: desired-state target mismatch") + var ErrDesiredTenantMismatch = errors.New("control: desired-state tenant mismatch") + var ErrInvalidDesiredTarget = errors.New("control: invalid desired-state target") + var ErrInvalidDesiredTransition = errors.New("control: invalid desired-state transition") + var ErrInvalidDispatcherConfiguration = errors.New("control: invalid dispatcher configuration") + var ErrLifecycleJournalUnavailable = errors.New("control: lifecycle journal unavailable") + var ErrNotDesiredStateAction = errors.New("control: action has no desired state") + var ErrOutcomeUnknown = errors.New("control: command outcome unknown") + type Authorizer interface + Authorize func(context.Context, string, string, controlplane.Permission, controlplane.Target) error + type DesiredRecord struct + ChangedAt time.Time + CommandKey string + Revision uint64 + State DesiredState + Target controlplane.Target + TenantID string + func NextDesiredState(current *DesiredRecord, command controlplane.Command) (DesiredRecord, error) + type DesiredState string + const DesiredActive + const DesiredDraining + const DesiredPaused + const DesiredTerminating + type DispatchOutcome struct + CapabilityAvailable *bool + CompletedAt time.Time + Failure string + Protocol *controlplane.ProtocolVersion + Status controlplane.CommandStatus + WorkerID string + type Dispatcher interface + Dispatch func(context.Context, controlplane.Command) error + type Journal interface + Accept func(context.Context, controlplane.Command) (result controlplane.CommandResult, created bool, err error) + Complete func(context.Context, controlplane.CommandResult) error + type LifecycleJournal interface + MarkAcknowledged func(context.Context, controlplane.CommandResult) error + MarkDispatched func(context.Context, controlplane.CommandResult) error + type ResultDispatcher interface + DispatchResult func(context.Context, controlplane.Command) (DispatchOutcome, error) + type RoutingDispatcher struct + func NewRoutingDispatcher(dataPlane Dispatcher, workloads Dispatcher) (*RoutingDispatcher, error) + func (dispatcher *RoutingDispatcher) Dispatch(ctx context.Context, command controlplane.Command) error + func (dispatcher *RoutingDispatcher) DispatchResult(ctx context.Context, command controlplane.Command) (DispatchOutcome, error) + type Service struct + func NewInstrumentedService(authorizer Authorizer, journal Journal, dispatcher Dispatcher, ...) (*Service, error) + func NewService(authorizer Authorizer, journal Journal, dispatcher Dispatcher, ...) *Service + func (s *Service) Execute(ctx context.Context, command controlplane.Command) (controlplane.CommandResult, error) + type UnavailableDispatcher struct + func (UnavailableDispatcher) Dispatch(context.Context, controlplane.Command) error