updater

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUpdater

func NewUpdater(
	ctx context.Context,
	binaryPath string,
	finalizer autoupdate.UpdateFinalizer,
	config *UpdaterConfig,
) (*actor.Actor, error)

NewUpdater returns an Actor suitable for an oklog/run group. It is a light wrapper around autoupdate.NewUpdater to simplify having multiple ones in launcher.

func UpdateFinalizer

func UpdateFinalizer(logger log.Logger, shutdownOsquery func() error) func() error

UpdateFinalizer finalizes a launcher update. It assume the new binary has been copied into place, and calls exec, so we start a new running launcher in our place.

Types

type UpdaterConfig

type UpdaterConfig struct {
	Logger             log.Logger
	RootDirectory      string // launcher's root dir. use for holding tuf staging and updates
	AutoupdateInterval time.Duration
	UpdateChannel      autoupdate.UpdateChannel
	InitialDelay       time.Duration // start delay, to avoid whomping critical early data
	NotaryURL          string
	MirrorURL          string
	NotaryPrefix       string
	HTTPClient         *http.Client
	SigChannel         chan os.Signal
}

UpdaterConfig is a struct of update related options. It's used to simplify the call to `createUpdater` from launcher's main blocks.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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