reboot

package
v0.0.0-...-56cb166 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithTracer = base.WithTracer

WithTracer returns an Option that configures the Client to use the supplied tracer.

Functions

This section is empty.

Types

type Client

type Client interface {
	// WatchForRebootEvent returns a watcher.NotifyWatcher that
	// reacts to reboot flag changes.
	WatchForRebootEvent(context.Context) (watcher.NotifyWatcher, error)

	// RequestReboot sets the reboot flag for the calling machine.
	RequestReboot(context.Context) error

	// ClearReboot clears the reboot flag for the calling machine.
	ClearReboot(context.Context) error

	// GetRebootAction returns the reboot action for the calling machine.
	GetRebootAction(context.Context) (params.RebootAction, error)
}

Client provides access to an reboot worker's client facade.

func NewClient

func NewClient(caller base.APICaller, machineTag names.MachineTag, options ...Option) Client

NewClient returns a version of the client that provides functionality required by the reboot worker.

func NewFromConnection

func NewFromConnection(c api.Connection) (Client, error)

NewFromConnection returns access to the Reboot API

type Option

type Option = base.Option

Option is a function that can be used to configure a Client.

Jump to

Keyboard shortcuts

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