Documentation
¶
Overview ¶
Package upgrade is `funcd upgrade` (ADR-0207 Decision 1): the installed binary checks the new one, stops the unit, writes a pre-upgrade generation of the three stores that it can restore itself, swaps the binary keeping <self>.previous, records the upgrade for safe mode and starts the unit again.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Snapshot ¶
Snapshot is steps 2 and 4 alone: it writes a pre-upgrade generation of cfg's stores. An empty metastore directory is fault.Invalid; a store or the file:// lock held by a running daemon is fault.Conflict naming its directory; every return after step 4 began re-owns what root wrote (Decision 1, Owner).
Types ¶
type Options ¶
type Options struct {
Config config.Config
NewBinary string
Self string
Unit string
NoSnapshot bool
Systemctl func(args ...string) ([]byte, error)
Out io.Writer
// contains filtered or unexported fields
}
Options configure Run. Self is the installed binary (os.Executable, symlinks resolved); Unit "" runs no systemctl; Systemctl runs `systemctl <args>` and returns its standard output.