coordinatorconf

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package coordinatorconf is meant to be used by update coordinators, such as locksmithd, to update the update coordinator metadata file. This file exists at a well-known location and serves as a means for coordinators to communicate that they are responsible for updates (via the 'NAME' field), and optionally what their status is.

This file lives at the well known locatoin "/run/update-engine/coordinator.conf" It is a key=value formatted file which should be safely bash-sourceable. In practice, it's expected that neither keys nor values have spaces in them nor take on arbitrary values.

The "NAME" key MUST be set. (e.g. `NAME=locksmithd`). The "STATUS" key should generally bet set. The STRATEGY key may optionally be set depending on the coordinator.

Index

Constants

View Source
const (
	CoordinatorStateStarting updateCoordinatorState = "starting"
	// CoordinatorStateDisabled indicates the coordinator is running, but is
	// intentionally not rebooting, likely due to user configuration
	CoordinatorStateDisabled = "disabled"
	// CoordinatorStateRunning indicates the normal operation of the coordinator
	CoordinatorStateRunning = "running"
	// CoordinatorStateRebootPlanned indicates a reboot will occur once some
	// condition is met (such as a lock being available)
	CoordinatorStateRebootPlanned = "reboot-planned"
	// CoordinatorStateRebooting indicates a reboot has been requested
	CoordinatorStateRebooting = "rebooting"
)
View Source
const UpdateCoordinatorConfPath = "/run/update-engine/coordinator.conf"

Variables

This section is empty.

Functions

This section is empty.

Types

type CoordinatorConfigUpdater

type CoordinatorConfigUpdater interface {
	UpdateState(updateCoordinatorState) error
}

func New

func New(name string, strategy string) (CoordinatorConfigUpdater, error)

New creates a new CoordinatorConfigUpdater. The "name" must be specified. Strategy can safely be left blank if desired. New will implicitly set the update coordinator state to "CoordinatorStateStarting"

Jump to

Keyboard shortcuts

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