apply

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CellDiffResult

type CellDiffResult struct {
	DiffResult

	RootContainerChanged bool
	RootContainerDetails map[string]string
	Containers           []ContainerDiff
	Orphans              []string // container IDs to be removed
}

CellDiffResult extends DiffResult with container-level diffs.

func DiffCell

func DiffCell(desired, actual intmodel.Cell) CellDiffResult

DiffCell compares desired and actual cell states.

type ChangeType

type ChangeType int

ChangeType classifies the type of change detected.

const (
	// ChangeTypeNone indicates no changes detected.
	ChangeTypeNone ChangeType = iota
	// ChangeTypeAdditive indicates new fields or resources added.
	ChangeTypeAdditive
	// ChangeTypeCompatible indicates backward-compatible changes (labels, env vars, etc.).
	ChangeTypeCompatible
	// ChangeTypeBreaking indicates breaking changes that require destructive operations.
	ChangeTypeBreaking
)

type ContainerDiff

type ContainerDiff struct {
	Name            string
	Action          string // "add", "remove", "update"
	ChangedFields   []string
	BreakingChanges []string
	Details         map[string]string
}

ContainerDiff represents changes to a container within a cell.

type DiffResult

type DiffResult struct {
	HasChanges      bool
	ChangeType      ChangeType
	ChangedFields   []string
	BreakingChanges []string
	Details         map[string]string // field -> description of change
}

DiffResult represents the result of comparing desired vs actual state.

func DiffContainer

func DiffContainer(desired, actual intmodel.Container) DiffResult

DiffContainer compares desired and actual container states.

func DiffRealm

func DiffRealm(desired, actual intmodel.Realm) DiffResult

DiffRealm compares desired and actual realm states.

func DiffSpace

func DiffSpace(desired, actual intmodel.Space) DiffResult

DiffSpace compares desired and actual space states.

func DiffStack

func DiffStack(desired, actual intmodel.Stack) DiffResult

DiffStack compares desired and actual stack states.

type ReconcileResult

type ReconcileResult struct {
	Action   string            // "created", "updated", "unchanged", "deleted"
	Kind     string            // Resource kind
	Name     string            // Resource name
	Resource interface{}       // The reconciled resource (internal model)
	Changes  []string          // List of changed fields
	Details  map[string]string // Detailed change descriptions
}

ReconcileResult represents the result of reconciling a resource.

func ReconcileCell

func ReconcileCell(r runner.Runner, desired intmodel.Cell) (ReconcileResult, error)

ReconcileCell reconciles a desired cell state with the actual state.

func ReconcileContainer

func ReconcileContainer(r runner.Runner, desired intmodel.Container) (ReconcileResult, error)

ReconcileContainer reconciles a desired container state with the actual state.

func ReconcileRealm

func ReconcileRealm(r runner.Runner, desired intmodel.Realm) (ReconcileResult, error)

ReconcileRealm reconciles a desired realm state with the actual state.

func ReconcileSpace

func ReconcileSpace(r runner.Runner, desired intmodel.Space) (ReconcileResult, error)

ReconcileSpace reconciles a desired space state with the actual state.

func ReconcileStack

func ReconcileStack(r runner.Runner, desired intmodel.Stack) (ReconcileResult, error)

ReconcileStack reconciles a desired stack state with the actual state.

Jump to

Keyboard shortcuts

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