Help us shape the future of Go! Take the 2026 Go Developer Survey

reconciliation

package
v0.4.26 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	ActionCreate  Action = "create"
	ActionNoop    Action = "noop"
	ActionRepair  Action = "repair"
	ActionDestroy Action = "destroy"
	ActionObserve Action = "observe"
	ActionBlocked Action = "blocked"
)

type Desired

type Desired struct {
	Exists bool      `json:"exists"`
	Digest string    `json:"digest,omitempty"`
	Owner  Ownership `json:"owner"`
}

type Diff

type Diff struct {
	DesiredDigest  string `json:"desired_digest,omitempty"`
	ObservedDigest string `json:"observed_digest,omitempty"`
	Changed        bool   `json:"changed"`
}

type Observed

type Observed struct {
	Exists      bool      `json:"exists"`
	Digest      string    `json:"digest,omitempty"`
	Owner       Ownership `json:"owner"`
	Conflict    bool      `json:"conflict,omitempty"`
	Unsupported bool      `json:"unsupported,omitempty"`
	Degraded    bool      `json:"degraded,omitempty"`
	Message     string    `json:"message,omitempty"`
}

type Ownership

type Ownership string
const (
	OwnershipBaseHarbor Ownership = "baseharbor"
	OwnershipExternal   Ownership = "external"
	OwnershipForeign    Ownership = "foreign"
	OwnershipUnknown    Ownership = "unknown"
)

type Result

type Result struct {
	State     State     `json:"state"`
	Action    Action    `json:"action"`
	Ownership Ownership `json:"ownership"`
	Diff      Diff      `json:"diff"`
	Message   string    `json:"message,omitempty"`
}

func Evaluate

func Evaluate(desired Desired, observed Observed) Result

func MarkDegraded

func MarkDegraded(result Result, message string) Result

func MarkVerified

func MarkVerified(result Result) Result

type State

type State string
const (
	StateMissing          State = "missing"
	StateInSync           State = "in_sync"
	StateDrift            State = "drift"
	StateConflict         State = "conflict"
	StateForeignOwnership State = "foreign_ownership"
	StateUnsupported      State = "unsupported"
	StateDegraded         State = "degraded"
)

Jump to

Keyboard shortcuts

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