power

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

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