Documentation
¶
Overview ¶
Package update implements verified binary staging and managed rollout messages.
Index ¶
- Constants
- func AssetName(os, arch string) string
- func Download(ctx context.Context, client *http.Client, url, token, path string, asset Asset) error
- func InspectExecutable(ctx context.Context, path string) (buildinfo.Info, error)
- func IsCurrent(info buildinfo.Info, version string, asset Asset) bool
- func Matches(info buildinfo.Info, asset Asset) bool
- func SaveBinary(reader io.Reader, path string, asset Asset) error
- func ShortError(err error) string
- func ValidDigest(value string) bool
- func ValidateExecutable(ctx context.Context, path, version string, asset Asset) error
- func Verify(path string, asset Asset) error
- type Asset
- type Command
- type Deployment
- type Manifest
- type PruneResult
- type Repository
- func (r *Repository) BeginInstall(id string, participants []string) error
- func (r *Repository) Blob(hash string) string
- func (r *Repository) Current() *Deployment
- func (r *Repository) Pin(assets []Asset) func()
- func (r *Repository) Prune(ctx context.Context, id string, retained []string) (PruneResult, error)
- func (r *Repository) Publish(manifest Manifest, source string) (*Deployment, error)
- func (r *Repository) SetPhase(id, phase string, cause error) error
- func (r *Repository) Upload(reader io.Reader, asset Asset) error
- type Status
- type Updater
- type UpdaterOptions
Constants ¶
const GatewaySender = "@gateway"
const MaxBinarySize int64 = 128 << 20
Variables ¶
This section is empty.
Functions ¶
func InspectExecutable ¶
func IsCurrent ¶
IsCurrent skips replacement of an already running version, even when a rebuild changes its timestamp or checksum. Matches remains strict for binary validation.
func SaveBinary ¶
SaveBinary never publishes incomplete or unverified data.
func ShortError ¶
func ValidDigest ¶
func ValidateExecutable ¶
Types ¶
type Deployment ¶
type Manifest ¶
type PruneResult ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func OpenRepository ¶
func OpenRepository(dir string) (*Repository, error)
func (*Repository) BeginInstall ¶
func (r *Repository) BeginInstall(id string, participants []string) error
func (*Repository) Blob ¶
func (r *Repository) Blob(hash string) string
func (*Repository) Current ¶
func (r *Repository) Current() *Deployment
func (*Repository) Pin ¶
func (r *Repository) Pin(assets []Asset) func()
Pin keeps assets available while a release is downloaded and published.
func (*Repository) Prune ¶
func (r *Repository) Prune(ctx context.Context, id string, retained []string) (PruneResult, error)
Prune removes obsolete gateway binaries only after durable rollout completion. Callers must serialize invitation creation and deployment selection with it.
func (*Repository) Publish ¶
func (r *Repository) Publish(manifest Manifest, source string) (*Deployment, error)
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater stages gateway-published binaries and applies them under an idle reservation. It is part of the node service, not an AI agent or a separate execution role.
func NewUpdater ¶
func NewUpdater(options UpdaterOptions) (*Updater, error)