Documentation
¶
Overview ¶
Package management provides a backend-agnostic interface for bare metal power control.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTransitioning = errors.New("power state transition already in progress")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
GetPowerState(ctx context.Context, hostID string) (*PowerStatus, error)
SetPowerState(ctx context.Context, hostID string, target PowerState) error
}
type OpenStackClient ¶
type OpenStackClient struct {
// contains filtered or unexported fields
}
func (*OpenStackClient) GetPowerState ¶
func (c *OpenStackClient) GetPowerState(ctx context.Context, hostID string) (*PowerStatus, error)
func (*OpenStackClient) SetPowerState ¶
func (c *OpenStackClient) SetPowerState(ctx context.Context, hostID string, target PowerState) error
type PowerState ¶
type PowerState string
const ( PowerOn PowerState = "power on" PowerOff PowerState = "power off" )
type PowerStatus ¶
type PowerStatus struct {
State PowerState
IsTransitioning bool
}
Click to show internal directories.
Click to hide internal directories.