agentspecbackfillcr

package
v0.0.0-...-804b954 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package agentspecbackfillcr owns the structural, canonical AgentSpecBackfill request and status wires.

Index

Constants

View Source
const (
	// APIVersion is the sole structural AgentSpecBackfill API version.
	APIVersion = "runtime.0x63616c.dev/v1alpha1"
	// Kind is the sole structural AgentSpecBackfill kind.
	Kind = "AgentSpecBackfill"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Name       string
	UID        string
	Generation uint64
}

Metadata is the bounded structural metadata accepted for one AgentSpecBackfill resource.

type Request

type Request struct {
	APIVersion string
	Kind       string
	Metadata   Metadata
	Spec       agentspecbackfill.Request
}

Request is the immutable structural AgentSpecBackfill request. Its Spec reuses the canonical backfill request.

func NewRequest

func NewRequest(spec agentspecbackfill.Request) (Request, error)

NewRequest creates the sole canonical initial AgentSpecBackfill request for a validated immutable spec.

func ParseRequest

func ParseRequest(input io.Reader) (Request, error)

ParseRequest decodes exactly one bounded canonical AgentSpecBackfill request wire.

func (Request) Canonical

func (request Request) Canonical() ([]byte, error)

Canonical returns the bounded canonical JSON request wire.

func (Request) ValidateImmutableMutation

func (request Request) ValidateImmutableMutation(next Request) error

ValidateImmutableMutation refuses any changed request metadata or spec.

type Status

type Status struct {
	Phase                 agentspecbackfill.Phase
	RequestUID            string
	ObservedGeneration    uint64
	ControllerImageDigest string
	RequestDigest         string
	SnapshotFingerprint   string
	SnapshotCount         uint64
	ManifestDigest        string
	StaticReadinessDigest string
	VerifiedCount         uint64
	Reason                agentspecbackfill.Reason
	CompletedAt           time.Time
}

Status is the bounded controller-owned structural AgentSpecBackfill result.

func ParseStatus

func ParseStatus(input io.Reader, request Request, now time.Time) (Status, error)

ParseStatus decodes exactly one bounded canonical AgentSpecBackfill status wire.

func (Status) CanonicalFor

func (status Status) CanonicalFor(request Request, now time.Time) ([]byte, error)

CanonicalFor returns the bounded canonical JSON status wire after validating it against its immutable request.

func (Status) ValidateFor

func (status Status) ValidateFor(request Request, now time.Time) error

ValidateFor proves a status is bounded and exactly bound to one observed immutable request.

func (Status) ValidateTransitionFrom

func (status Status) ValidateTransitionFrom(previous Status, request Request, now time.Time) error

ValidateTransitionFrom refuses every mutation from a terminal status.

Jump to

Keyboard shortcuts

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