reconcile

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

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

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

Prepare resolves the exact source revision covered by a deployment approval.

func (*Service) Reconcile

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.

Jump to

Keyboard shortcuts

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