Documentation
¶
Overview ¶
Package apply implements the cross-manager orchestrator that aggregates Plan / Apply / Verify / Rollback across all 13 managers in dependency order.
Index ¶
- type DiffReport
- type Orchestrator
- func (o *Orchestrator) Apply(ctx context.Context) (*managers.ApplyResult, error)
- func (o *Orchestrator) Diff(ctx context.Context) (*DiffReport, error)
- func (o *Orchestrator) Plan(ctx context.Context) (PlanResult, error)
- func (o *Orchestrator) Rollback(ctx context.Context) error
- func (o *Orchestrator) Verify(ctx context.Context) (*VerifyAggregate, error)
- func (o *Orchestrator) WithLinux(l *config.Linux) *Orchestrator
- func (o *Orchestrator) WithManagers(mgrs []managers.Manager) *Orchestrator
- type PlanResult
- type VerifyAggregate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiffReport ¶
DiffReport is a human-renderable drift diff.
type Orchestrator ¶
type Orchestrator struct {
Env *config.Env
Linux *config.Linux
Session session.Session
Managers []managers.Manager
DryRun bool
ContinueOnError bool
// ReformatFilesystems is forwarded to DiskManager during bindSession so
// `linuxctl --reformat-filesystems apply apply` opts in to destructive
// mkfs on mismatched filesystems (linuxctl#52). Default false.
ReformatFilesystems bool
// contains filtered or unexported fields
}
Orchestrator runs the full plan/apply/verify/rollback pipeline across managers.
func New ¶
New constructs an orchestrator. mgrs is optional — when nil the global managers.Registry() snapshot is used and ordered by defaultOrder.
func (*Orchestrator) Apply ¶
func (o *Orchestrator) Apply(ctx context.Context) (*managers.ApplyResult, error)
Apply runs Plan then executes changes in dependency order. On error, it stops unless ContinueOnError is set, and records applied changes for subsequent Rollback.
func (*Orchestrator) Diff ¶
func (o *Orchestrator) Diff(ctx context.Context) (*DiffReport, error)
Diff is a read-only drift report.
func (*Orchestrator) Plan ¶
func (o *Orchestrator) Plan(ctx context.Context) (PlanResult, error)
Plan runs Plan on every manager and aggregates the resulting changes.
func (*Orchestrator) Rollback ¶
func (o *Orchestrator) Rollback(ctx context.Context) error
Rollback reverses previously applied changes in reverse manager order.
func (*Orchestrator) Verify ¶
func (o *Orchestrator) Verify(ctx context.Context) (*VerifyAggregate, error)
Verify runs Verify on every manager and reports which have drift.
func (*Orchestrator) WithLinux ¶
func (o *Orchestrator) WithLinux(l *config.Linux) *Orchestrator
WithLinux sets the decoded linux.yaml used for per-manager desired-state extraction.
func (*Orchestrator) WithManagers ¶
func (o *Orchestrator) WithManagers(mgrs []managers.Manager) *Orchestrator
WithManagers overrides the default registry lookup. Order matters.
type PlanResult ¶
type PlanResult struct {
Changes []managers.Change
ByManager map[string][]managers.Change
TotalCreate int
TotalUpdate int
TotalDelete int
}
PlanResult aggregates per-manager changes.
type VerifyAggregate ¶
type VerifyAggregate struct {
InDrift []string
Matches bool
Detail map[string]managers.VerifyResult
}
VerifyAggregate reports drift across managers.