reboot

package
v0.0.0-...-d2d3a67 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: AGPL-3.0 Imports: 16 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfig

type AgentConfig interface {
	Model() Model
}

AgentConfig describes the method required for a AgentConfig in Reboot.

type Manager

type Manager interface {
	IsInitialized() bool
	ListContainers() ([]instances.Instance, error)
}

Manager describes the method required for a ContainerManager in Reboot.

type Model

type Model interface {
	Id() string
}

Model describes the method required for a Model in Reboot.

type Reboot

type Reboot struct {
	// contains filtered or unexported fields
}

Reboot implements the ExecuteReboot command which will reboot a machine once all containers have shut down, or a timeout is reached

func NewRebootWaiter

func NewRebootWaiter(acfg agent.Config) (*Reboot, error)

func (*Reboot) ExecuteReboot

func (r *Reboot) ExecuteReboot(action params.RebootAction) error

ExecuteReboot will wait for all running containers to stop, and then execute a shutdown or a reboot (based on the action param)

type RebootWaiter

type RebootWaiter interface {
	ListServices() ([]string, error)
	NewServiceReference(string) (Service, error)
	NewContainerManager(instance.ContainerType, container.ManagerConfig) (Manager, error)
	ScheduleAction(action params.RebootAction, after int) error
}

RebootWaiter describes the functions required by Reboot. Added for use in mocked tests.

type Service

type Service interface {
	Stop() error
}

Service describes the method required for a Service in Reboot.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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