Documentation
¶
Overview ¶
Package domain holds the core vocabulary of Ripen: modes, backends, actors, result codes, and image references. Capitalized terms in the documentation (Transaction, Baseline, Candidate, ...) are defined in CONTEXT.md; the types here are their code form.
Index ¶
Constants ¶
const ( // EventSchemaVersion is the Event envelope's version. EventSchemaVersion = 1 // StateSchemaVersion is the latest supported SQLite state schema version. StateSchemaVersion = 2 )
Schema versions. Each surface versions independently: a change to the Event envelope does not force a Response envelope bump, and neither forces a state schema migration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor string
Actor identifies the surface that performed a write or emitted an Event. It is determined by the running surface, never accepted as a parameter.
type Backend ¶
type Backend string
Backend names the orchestrator a stack is managed by. The enum is closed at three values for v1.
const ( BackendPortainer Backend = "portainer" BackendDockerCompose Backend = "docker-compose" BackendPodmanCompose Backend = "podman-compose" )
The three v1 backends.
func ParseBackend ¶
ParseBackend validates a backend string from configuration.
type Fingerprint ¶
type Fingerprint struct {
// contains filtered or unexported fields
}
Fingerprint accumulates the labeled parts of a stack observation into one hash. A Transaction plans against a fingerprint and refuses to apply if it has changed, so the hash must not depend on the order the caller adds parts in beyond what the caller controls, and must not let two different part lists collide: every part is length-prefixed.
func NewFingerprint ¶
func NewFingerprint() *Fingerprint
NewFingerprint starts an empty fingerprint.
func (*Fingerprint) Add ¶
func (f *Fingerprint) Add(label, value string)
Add mixes in one labeled string part.
func (*Fingerprint) AddBytes ¶
func (f *Fingerprint) AddBytes(label string, value []byte)
AddBytes mixes in one labeled byte part.
type ImageReference ¶
type ImageReference struct {
Registry string
Repository string
Tag string
Original string
PinnedDigest string
}
ImageReference is a parsed OCI image reference. Tag is the update channel; PinnedDigest, when present, is the exact deployed content.
func ParseImageReference ¶
func ParseImageReference(value string) (ImageReference, error)
ParseImageReference parses an image reference as written in a compose file. Docker Hub references normalize to registry-1.docker.io with a library/ prefix for official images; other registries are preserved as written. A missing tag defaults to latest.
func (ImageReference) Pinned ¶
func (r ImageReference) Pinned(digest string) string
Pinned renders the tagged form pinned to an exact digest.
func (ImageReference) Tagged ¶
func (r ImageReference) Tagged() string
Tagged renders the mutable (channel) form: registry/repository:tag.
type Mode ¶
type Mode string
Mode selects what a run may do: Monitor observes and baselines only, Apply may additionally mutate one Service or open a Proposal.
type ResultCode ¶
type ResultCode string
ResultCode is the closed set of per-stack run outcomes. Receivers must ignore unknown codes, so additions are non-breaking.
const ( ResultBaselined ResultCode = "baselined" ResultBaselineBlocked ResultCode = "baseline_blocked" ResultBreakerOpen ResultCode = "breaker_open" ResultBusy ResultCode = "busy" ResultCandidate ResultCode = "candidate" ResultDrifted ResultCode = "drifted" ResultError ResultCode = "error" ResultExcluded ResultCode = "excluded" ResultIneligible ResultCode = "ineligible" ResultNotVisible ResultCode = "not_visible" ResultProposed ResultCode = "proposed" ResultRollbackFailed ResultCode = "rollback_failed" ResultRolledBack ResultCode = "rolled_back" ResultUpdated ResultCode = "updated" ResultUpToDate ResultCode = "up_to_date" )
The v1 result codes.