Documentation ¶
Overview ¶
Package power provides power management functionality for machines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoPowerManagementInfo = fmt.Errorf("no power management info found")
ErrNoPowerManagementInfo is returned when there is no power management info present yet for a machine.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { io.Closer Reboot(ctx context.Context) error IsPoweredOn(ctx context.Context) (bool, error) PowerOn(ctx context.Context) error PowerOff(ctx context.Context) error SetPXEBootOnce(ctx context.Context, mode pxe.BootMode) error }
Client is the interface to interact with a single machine to send power commands to it.
type ClientFactory ¶
type ClientFactory struct {
// contains filtered or unexported fields
}
ClientFactory is a factory to create power management clients.
func NewClientFactory ¶
func NewClientFactory(options ClientFactoryOptions, logger *zap.Logger) *ClientFactory
NewClientFactory creates a new power management client factory.
func (*ClientFactory) GetClient ¶
func (factory *ClientFactory) GetClient(mgmt *specs.PowerManagement) (Client, error)
GetClient returns a power management client for the given bare metal machine.
type ClientFactoryOptions ¶
type ClientFactoryOptions struct { ExperimentalUseRedfish bool RedfishSetBootSourceOverrideMode bool }
ClientFactoryOptions contains options for the client factory.
Directories ¶
Path | Synopsis |
---|---|
Package api provides power management functionality using an HTTP API, e.g., the HTTP API run by 'talosctl cluster create'.
|
Package api provides power management functionality using an HTTP API, e.g., the HTTP API run by 'talosctl cluster create'. |
Package ipmi provides power management functionality using IPMI.
|
Package ipmi provides power management functionality using IPMI. |
Package pxe contains types related to PXE booting.
|
Package pxe contains types related to PXE booting. |
Package redfish provides power management functionality using Redfish.
|
Package redfish provides power management functionality using Redfish. |
Click to show internal directories.
Click to hide internal directories.