Documentation
¶
Overview ¶
Package api provides BMC functionality using an HTTP API, e.g., the HTTP API run by 'talosctl cluster create'.
Index ¶
- type AddressReader
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressReader ¶
type AddressReader struct {
// contains filtered or unexported fields
}
AddressReader reads the BMC address from the state directory for a given machine ID.
func NewAddressReader ¶
func NewAddressReader(stateDir string) *AddressReader
NewAddressReader creates a new API AddressReader.
func (*AddressReader) ReadManagementAddress ¶
func (manager *AddressReader) ReadManagementAddress(machineID string, logger *zap.Logger) (string, error)
ReadManagementAddress reads the BMC address from the state directory for the given machine ID.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an API BMC client: it communicates with an HTTP API to send BMC commands.
func NewClient ¶
func NewClient(info *specs.BMCConfigurationSpec_API) (*Client, error)
NewClient creates a new API BMC client.
func (*Client) IsPoweredOn ¶
IsPoweredOn implements the power.Client interface.
Click to show internal directories.
Click to hide internal directories.