juju: github.com/wallyworld/juju/worker/reboot Index | Files

package reboot

import "github.com/wallyworld/juju/worker/reboot"


Package Files

manifold.go reboot.go

func Manifold Uses

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency manifold that runs a reboot worker, using the resource names defined in the supplied config.

func NewReboot Uses

func NewReboot(st reboot.State, agentConfig agent.Config, machineLock machinelock.Lock, clock clock.Clock) (worker.Worker, error)

type ManifoldConfig Uses

type ManifoldConfig struct {
    AgentName     string
    APICallerName string
    MachineLock   machinelock.Lock
    Clock         clock.Clock

ManifoldConfig defines the names of the manifolds on which a Manifold will depend.

type Reboot Uses

type Reboot struct {
    // contains filtered or unexported fields

The reboot worker listens for changes to the reboot flag and exists with worker.ErrRebootMachine if the machine should reboot or with worker.ErrShutdownMachine if it should shutdown. This will be picked up by the machine agent as a fatal error and will do the right thing (reboot or shutdown)

func (*Reboot) Handle Uses

func (r *Reboot) Handle(_ <-chan struct{}) error

func (*Reboot) SetUp Uses

func (r *Reboot) SetUp() (watcher.NotifyWatcher, error)

func (*Reboot) TearDown Uses

func (r *Reboot) TearDown() error

Package reboot imports 15 packages (graph). Updated 2020-08-03. Refresh now. Tools for package owners.