Documentation
¶
Index ¶
- Variables
- func List(out io.Writer, root string) error
- func ParseSet(pairs []string) (map[string]string, error)
- func ReadSetFile(pairs []string) (map[string]string, error)
- func Status(ctx context.Context, out io.Writer, kinds []machine.Machine, root, name string) error
- func Uninstall(ctx context.Context, out io.Writer, kinds []machine.Machine, root, name string) error
- type Install
- func (i Install) Preview() Install
- func (i Install) Resume(ctx context.Context, out io.Writer, work report.Report) error
- func (i Install) Run(ctx context.Context, out io.Writer, work report.Report) error
- func (i Install) SkipAction(ctx context.Context, out io.Writer, work report.Report) error
- func (i Install) Upgrade(ctx context.Context, out io.Writer, work report.Report) error
Constants ¶
This section is empty.
Variables ¶
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.
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.
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.
var ErrNoOpenAction = errors.New("the unfinished install left no action halfway, run resume")
var ErrNoRecord = errors.New("this machine holds no record of that delivery")
var ErrPartlyInstalled = errors.New("this machine is partway through the install")
ErrPartlyInstalled says the machine was already changed when this install stopped.
var ErrRecordDoesNotMatch = errors.New("this machine no longer matches the record")
var ErrRecordOpen = errors.New("the last install on this machine never finished")
var ErrServiceIsDown = errors.New("did not start")
Functions ¶
func ReadSetFile ¶
ReadSetFile turns a repeated --set-file NAME=path flag into the values those files hold.
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 ¶
Preview returns this install as a dry run: it checks and plans, runs no from:, and changes nothing.
func (Install) Resume ¶
Resume finishes the install this bundle started, skipping every step and action the record says finished.
func (Install) Run ¶
Run puts the images, the files and the secrets on the machine, then starts the services once.
func (Install) SkipAction ¶
SkipAction marks the action an install left halfway as finished, without running it, then resumes.