Documentation
¶
Overview ¶
Package service is the application boundary shared by installer frontends. It owns registry load/save around the canonical apply engine; frontends never compose a second apply path or persist transient results as authority.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CellRequest ¶
type Config ¶
type Config struct {
Registry Registry
Contracts map[ir.HarnessID]activation.ActivationContract
Activators []apply.Activator
// Group is the one statically selected selection-wide native transition.
// It never receives registry persistence and cannot create another authority.
Group GroupReconciler
}
Config supplies the complete static activation graph and real side-effect seams. Contracts are copied and validated exhaustively by every operation.
type FileRegistry ¶
type FileRegistry struct {
// contains filtered or unexported fields
}
FileRegistry is the production registry implementation.
func NewFileRegistry ¶
func NewFileRegistry(path string) (FileRegistry, error)
func (FileRegistry) Path ¶
func (r FileRegistry) Path() string
type GroupAction ¶
type GroupAction struct {
// contains filtered or unexported fields
}
func NewGroupAction ¶
func (GroupAction) Row ¶
func (a GroupAction) Row() apply.ActionRow
type GroupActionKind ¶
type GroupActionKind uint8
func EnsureCellGroupAction ¶
func EnsureCellGroupAction() GroupActionKind
func InspectGroupAction ¶
func InspectGroupAction() GroupActionKind
func RemoveCellGroupAction ¶
func RemoveCellGroupAction() GroupActionKind
func RemoveSharedGroupAction ¶
func RemoveSharedGroupAction() GroupActionKind
func (GroupActionKind) IsValid ¶
func (k GroupActionKind) IsValid() bool
type GroupFacts ¶
type GroupFacts struct {
// contains filtered or unexported fields
}
GroupFacts is one complete, live-inspected three-cell fact set.
func NewGroupFacts ¶
func NewGroupFacts(actions ...GroupAction) (GroupFacts, error)
func (GroupFacts) Actions ¶
func (f GroupFacts) Actions() []GroupAction
type GroupPlan ¶
type GroupPlan struct {
// contains filtered or unexported fields
}
func NewGroupPlan ¶
func NewGroupPlan(results []GroupResultCell, actions []GroupStep) (GroupPlan, error)
func (GroupPlan) ResultCells ¶
func (p GroupPlan) ResultCells() []GroupResultCell
type GroupReconciler ¶
type GroupReconciler interface {
Harness() ir.HarnessID
PlanSelection(context.Context, GroupSelection) (GroupPlan, error)
ExecuteAction(context.Context, GroupSelection, GroupPlan, GroupStep) error
InspectAction(context.Context, GroupSelection, GroupPlan, GroupStep, error) (GroupFacts, error)
ClosePlan(context.Context, GroupSelection, GroupPlan, GroupTerminalStage) error
PreflightCell(context.Context, GroupCell) error
}
type GroupResultCell ¶
type GroupResultCell struct {
// contains filtered or unexported fields
}
GroupResultCell is one of the exactly three canonical output cells. Result cells are intentionally independent from native action count.
func NewGroupResultCell ¶
func (GroupResultCell) Cell ¶
func (r GroupResultCell) Cell() cell.Cell
func (GroupResultCell) Key ¶
func (r GroupResultCell) Key() registry.Key
func (GroupResultCell) Operation ¶
func (r GroupResultCell) Operation() apply.Operation
type GroupSelection ¶
type GroupSelection struct {
Selection selection.Selection
Scope apply.Scope
Source apply.Source
Prior map[cell.Cell]registry.Record
Activation map[cell.Cell]activation.ComponentActivation
}
func (GroupSelection) Harness ¶
func (s GroupSelection) Harness() ir.HarnessID
type GroupStep ¶
type GroupStep struct {
// contains filtered or unexported fields
}
GroupStep is one typed native action. It contains no command, callback, argument vector, or session identity.
func NewGroupStep ¶
func NewGroupStep(kind GroupActionKind, control cell.Cell) (GroupStep, error)
func (GroupStep) ControlCell ¶
func (GroupStep) Kind ¶
func (s GroupStep) Kind() GroupActionKind
type GroupTerminalStage ¶
type GroupTerminalStage uint8
const ( GroupTerminalInvalid GroupTerminalStage = iota GroupTerminalPlanInvalid GroupTerminalCanceled GroupTerminalExecuteFailed GroupTerminalInspectFailed GroupTerminalFactInvalid GroupTerminalSaveFailed GroupTerminalSucceeded )
func (GroupTerminalStage) IsValid ¶
func (s GroupTerminalStage) IsValid() bool
type Registry ¶
type Registry interface {
Load(context.Context) (registry.Store, error)
Save(context.Context, registry.Store) error
}
Registry is the injected atomic persistence boundary. Implementations must make Save replace one complete registry or leave the prior registry intact.
type SelectionRequest ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ApplySelection ¶
func (s *Service) ApplySelection(ctx context.Context, request SelectionRequest) (apply.Result, error)
ApplySelection and ApplyCell deliberately share load, canonical binding, execution, and per-fact atomic persistence.