Documentation
¶
Overview ¶
Package reconcile turns approved desired state into fenced node-agent calls.
Service owns the write path. It resolves the requested source to an exact app revision, decides placement over the authoritative fleet snapshot, records desired state and its receipts in the relational store, and only then calls the selected node's agent. It implements operator.IReconciler, so Prepare and ReconcileApproved are always separated by Core's approval gate.
Callers may rely on Prepare being read-only — it resolves and validates a revision without touching a node or desired state — on ReconcileApproved refusing to apply an input whose revision is no longer byte-for-byte identical to the approved one, on mutation being blocked unless Warden reports an authoritative view with a leader and quorum, and on every run reaching a durable terminal outcome before it is reported complete.
Index ¶
- type Service
- func (s *Service) Prepare(ctx context.Context, input *deployv1.ReconcileIntent) (*deployv1.ReconcileRevision, error)
- func (s *Service) Reconcile(ctx context.Context, input *deployv1.ReconcileIntent) (*deployv1.ReconcileEvidence, error)
- func (s *Service) ReconcileApproved(ctx context.Context, input *deployv1.ReconcileIntent, ...) (*deployv1.ReconcileEvidence, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service owns placement, relational desired state, and node reconciliation.
func NewService ¶
func NewService( launcher proc.ILauncher, workspace string, labels map[string]map[string]string, fleetClient *fleet.Client, agents *client.Client, controlStore *store.Store, ) (*Service, error)
NewService constructs a mutator. Dependencies are kept explicit so neither the web process nor the selected agent harness can reach the Docker socket. Git runs through launcher, the process-boundary capability.
func (*Service) Prepare ¶
func (s *Service) Prepare( ctx context.Context, input *deployv1.ReconcileIntent, ) (*deployv1.ReconcileRevision, error)
Prepare resolves the exact source revision covered by a deployment approval.
func (*Service) Reconcile ¶
func (s *Service) Reconcile( ctx context.Context, input *deployv1.ReconcileIntent, ) (*deployv1.ReconcileEvidence, error)
Reconcile applies canonical desired state without a previously approved revision. Its caller owns the policy decision to permit that mutation.
func (*Service) ReconcileApproved ¶
func (s *Service) ReconcileApproved( ctx context.Context, input *deployv1.ReconcileIntent, expected *deployv1.ReconcileRevision, ) (*deployv1.ReconcileEvidence, error)
ReconcileApproved applies an input only when the revision resolved at the dispatch boundary is byte-for-byte identical to the approved revision.