Documentation ¶
Overview ¶
Package api provides power management functionality using an HTTP API, e.g., the HTTP API run by 'talosctl cluster create'.
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) IsPoweredOn(ctx context.Context) (bool, error)
- func (c *Client) PowerOff(ctx context.Context) error
- func (c *Client) PowerOn(ctx context.Context) error
- func (c *Client) Reboot(ctx context.Context) error
- func (c *Client) SetPXEBootOnce(ctx context.Context, _ pxe.BootMode) error
- type PowerManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an API power management client: it communicates with an HTTP API to send power management commands.
func NewClient ¶
func NewClient(info *specs.PowerManagement_API) (*Client, error)
NewClient creates a new API power management client.
func (*Client) IsPoweredOn ¶
IsPoweredOn implements the power.Client interface.
type PowerManager ¶
type PowerManager struct {
// contains filtered or unexported fields
}
PowerManager is an API power management state manager.
func NewPowerManager ¶
func NewPowerManager(stateDir string) *PowerManager
NewPowerManager creates a new API PowerManager.
func (*PowerManager) ReadManagementAddress ¶
func (manager *PowerManager) ReadManagementAddress(machineID string, logger *zap.Logger) (string, error)
ReadManagementAddress reads the power management address from the state directory for the given machine ID.
Click to show internal directories.
Click to hide internal directories.