instanceupdate

package
v1.0.0-rc.9 Latest Latest
Warning

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

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

Documentation

Overview

Package instanceupdate owns authenticated release availability. It does not install releases or claim that a running installation is update-ready.

Index

Constants

View Source
const (
	ManifestName  = "UPDATE-MANIFEST.json"
	NotesName     = "RELEASE-NOTES.md"
	ChecksumsName = "SHA256SUMS"
	BundleName    = "SHA256SUMS.sigstore.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	Artifact
	// Members names paths relative to the archive's single release directory.
	Members map[string]string `json:"members"`
}

type Artifact

type Artifact struct {
	Name   string `json:"name"`
	SHA256 string `json:"sha256"`
	Size   int64  `json:"size"`
}

type Candidate

type Candidate struct {
	Version  string   `json:"version"`
	Commit   string   `json:"commit"`
	Platform string   `json:"platform"`
	Notes    string   `json:"notes"`
	Archive  Artifact `json:"archive"`
	Evidence Evidence `json:"evidence"`
}

type Compatibility

type Compatibility struct {
	Schema               Range  `json:"sourceSchema"`
	Layout               Range  `json:"sourceLayout"`
	SchemaResult         int    `json:"schemaResult"`
	LayoutResult         int    `json:"layoutResult"`
	CLIProtocol          int    `json:"cliProtocol"`
	DaemonWorkerProtocol int    `json:"daemonWorkerProtocol"`
	WorkerProtocol       Range  `json:"workerProtocol"`
	UpdaterProtocol      int    `json:"updaterProtocol"`
	WorkerStateQualified bool   `json:"workerStateQualified"`
	AgentABIQualified    bool   `json:"agentABIQualified"`
	DatabaseTransition   string `json:"databaseTransition"`
	RuntimeTransition    string `json:"runtimeTransition"`
}

type Evidence

type Evidence struct {
	ManifestSHA256  string `json:"manifestSHA256"`
	ChecksumsSHA256 string `json:"checksumsSHA256"`
	Signer          string `json:"signer"`
	Issuer          string `json:"issuer"`
	SourceCommit    string `json:"sourceCommit"`
}

Evidence retains what was authenticated, separate from installed provenance.

type Image

type Image struct {
	Repository string            `json:"repository"`
	Index      string            `json:"index"`
	Platforms  map[string]string `json:"platforms"`
}

type Manifest

type Manifest struct {
	Format        int                `json:"format"`
	Version       string             `json:"version"`
	Commit        string             `json:"commit"`
	Notes         Artifact           `json:"notes"`
	Archives      map[string]Archive `json:"archives"`
	Images        map[string]Image   `json:"images"`
	Compatibility Compatibility      `json:"compatibility"`
}

Manifest binds every artifact to one authenticated release. Zero updater protocol and unqualified worker state explicitly decline replacement support.

type Options

type Options struct {
	SupervisorSocket string
	DataDir          string
	Build            string
	Platform         string
	Channel          string
	Authority        access.Authorizer
	Now              func() time.Time
	Transport        http.RoundTripper
}

Options binds one installation's notification owner. Transport injection is assembly input, not a destination or credential accepted from an HTTP caller.

type Range

type Range struct {
	Min int `json:"min"`
	Max int `json:"max"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(in Options) (*Service, error)

func (*Service) Check

func (s *Service) Check(ctx context.Context) (Status, error)

Check is an explicit administrator request. Concurrent or repeated requests share the owner's cooldown rather than creating unbounded public fetches.

func (*Service) Run

func (s *Service) Run(ctx context.Context) error

Run is public-information discovery under daemon lifetime, never updater execution. The normal daemon calls it; verify-only startup does not.

func (*Service) Status

func (s *Service) Status(ctx context.Context) (Status, error)

type Status

type Status struct {
	SupervisorState  string     `json:"supervisorState"`
	SupervisorReason string     `json:"supervisorReason"`
	SupervisorPhase  string     `json:"supervisorPhase,omitempty"`
	Build            string     `json:"build"`
	Platform         string     `json:"platform"`
	Channel          string     `json:"channel"`
	State            string     `json:"state"`
	LastAttempt      *time.Time `json:"lastAttempt,omitempty"`
	LastSuccess      *time.Time `json:"lastSuccess,omitempty"`
	Candidate        *Candidate `json:"candidate,omitempty"`
	ReasonCode       string     `json:"reasonCode,omitempty"`
	Reason           string     `json:"reason,omitempty"`
	// U1 never confuses a verified candidate with enrolled recovery/replacement.
	AutomaticReplacement bool   `json:"automaticReplacement"`
	ReplacementReason    string `json:"replacementReason"`
}

Directories

Path Synopsis
Package supervisor owns one registered host installation's external control journal and restart fence.
Package supervisor owns one registered host installation's external control journal and restart fence.

Jump to

Keyboard shortcuts

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