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

delivery

package
v0.0.0-...-da95ae7 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNothingToResume = errors.New("this machine holds no unfinished install of that delivery")
	ErrOtherBundle     = errors.New("this bundle is not the one the machine stopped installing")
	ErrActionUnknown   = errors.New("an action may have stopped halfway, check it by hand")
	ErrSetAfterValues  = errors.New("the unfinished install already stored its values, resume without --set")
	ErrRecordTooOld    = errors.New("an older vessel left this install unfinished, it cannot say how far it ran")
)

Errors Resume returns before it changes anything.

View Source
var (
	ErrBadSet              = errors.New("is not NAME=value")
	ErrSetIsEmpty          = errors.New("gives no value, and a value is never empty")
	ErrSecretFileOpen      = errors.New("is readable by other users, chmod 600 it")
	ErrSecretOnCommandLine = errors.New("is a secret, pass it with --set-file so it never shows on a command line")
	ErrSetFilePlain        = errors.New("is not a secret, pass it with --set")
)

Errors a --set or --set-file flag draws.

View Source
var (
	ErrFileExists = errors.New("is already on this machine and no delivery put it there, move it away or drop it from the descriptor")
	ErrFileTaken  = errors.New("belongs to another delivery")
)

Errors an install returns for a file it does not own, before it changes anything.

View Source
var ErrNoOpenAction = errors.New("the unfinished install left no action halfway, run resume")
View Source
var ErrNoRecord = errors.New("this machine holds no record of that delivery")
View Source
var ErrPartlyInstalled = errors.New("this machine is partway through the install")

ErrPartlyInstalled says the machine was already changed when this install stopped.

View Source
var ErrRecordDoesNotMatch = errors.New("this machine no longer matches the record")
View Source
var ErrRecordOpen = errors.New("the last install on this machine never finished")
View Source
var ErrServiceIsDown = errors.New("did not start")

Functions

func List

func List(out io.Writer, root string) error

List names every delivery this machine holds a record of, with the version it holds.

func ParseSet

func ParseSet(pairs []string) (map[string]string, error)

ParseSet turns a repeated --set NAME=value flag into the values it names.

func ReadSetFile

func ReadSetFile(pairs []string) (map[string]string, error)

ReadSetFile turns a repeated --set-file NAME=path flag into the values those files hold.

func Status

func Status(ctx context.Context, out io.Writer, kinds []machine.Machine, root, name string) error

Status prints what this machine holds for a delivery, and fails when disk no longer matches it.

func Uninstall

func Uninstall(ctx context.Context, out io.Writer, kinds []machine.Machine, root, name string) error

Uninstall stops the services, removes exactly the files the record names, then retires the record.

Types

type Install

type Install struct {
	Artifact *bundle.Bundle
	Root     string
	Set      map[string]string
	SetFile  map[string]string
	Machines []machine.Machine
	Shell    *machine.Shell
	// contains filtered or unexported fields
}

Install is one run of putting a bundle on one machine.

func (Install) Preview

func (i Install) Preview() Install

Preview returns this install as a dry run: it checks and plans, runs no from:, and changes nothing.

func (Install) Resume

func (i Install) Resume(ctx context.Context, out io.Writer, work report.Report) error

Resume finishes the install this bundle started, skipping every step and action the record says finished.

func (Install) Run

func (i Install) Run(ctx context.Context, out io.Writer, work report.Report) error

Run puts the images, the files and the secrets on the machine, then starts the services once.

func (Install) SkipAction

func (i Install) SkipAction(ctx context.Context, out io.Writer, work report.Report) error

SkipAction marks the action an install left halfway as finished, without running it, then resumes.

func (Install) Upgrade

func (i Install) Upgrade(ctx context.Context, out io.Writer, work report.Report) error

Upgrade installs a newer version, refusing a machine that holds no record of this delivery.

Jump to

Keyboard shortcuts

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