power

package
v0.0.0-...-7a62f64 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidPowerCapabilityType = fmt.Errorf("invalid power capability type")
View Source
var (
	ErrInvalidStatus = errors.New("invalid machine status")
)

Functions

This section is empty.

Types

type PowerCapability

type PowerCapability int
const (
	PowerCapabilityTypeWakeOnLan PowerCapability = iota
	PowerCapabilityTypePowerOff
	PowerCapabilityTypeReboot
	PowerCapabilityTypeUnknown
)

func PowerCapabilityTypeFromString

func PowerCapabilityTypeFromString(s string) (PowerCapability, error)

func (PowerCapability) String

func (c PowerCapability) String() string

type Status

type Status struct {
	Status    StatusCode
	UpdatedAt time.Time
}

func NewStatus

func NewStatus(status StatusCode, updatedAt time.Time) *Status

type StatusCode

type StatusCode int64
const (
	StatusCodeRunning StatusCode = iota
	StatusCodeStopped
	StatusCodeStopping
	StatusCodeStarting
	StatusCodeRebooting
	StatusCodePending
	StatusCodeUnknown
)

func StatusCodeFromString

func StatusCodeFromString(v string) (StatusCode, error)

func (StatusCode) String

func (m StatusCode) String() string

Jump to

Keyboard shortcuts

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