Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidBootdev = errors.New("Invalid boot device.")
)
View Source
var ErrUnknownType = errors.New("Unknown obm type")
Indicates that Registry.GetOBM was called with a "type" field not in the registry.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface { // Get an obm object based on the provided info. GetOBM(info []byte) (OBM, error) }
A driver for a type of OBM.
type OBM ¶
type OBM interface { // Manage the OBM. A goroutine executing Serve must be running when // any other OBM method. Serve(ctx context.Context) // Connect to the console. Returns the connection and any error. DialConsole() (io.ReadCloser, error) // Disconnect the current console session, if any. DropConsole() error // Power on the node. PowerOn() error // Power off the node. PowerOff() error // Reboot the node. `force` indicates whether to do a hard power off, // or a soft shutdown (giving the node's operating system a change to // respond). PowerCycle(force bool) error // Sets the next boot device to `dev`. Valid boot devices are // driver-dependent. SetBootdev(dev string) error // Gets the node's power status. GetPowerStatus() (string, error) }
An OBM.
type Registry ¶
A registry is aggregates multiple drivers. It satisfies the driver interface itself, expecting it's info to be JSON like:
{"type": someType, "info": driverInfo}
where someType is a JSON string, and driverInfo is arbitrary JSON. Its GetOBM method shells out to registry[someType].GetOBM(driverInfo), returning ErrUnknownType if someType is not in the registry.
Directories ¶
Path | Synopsis |
---|---|
Package coordinator handles high-level console synchronization for drivers.
|
Package coordinator handles high-level console synchronization for drivers. |
Package ipmi implements an OBM driver for IPMI controllers.
|
Package ipmi implements an OBM driver for IPMI controllers. |
Package mock implements a mock driver for testing purposes.
|
Package mock implements a mock driver for testing purposes. |
Click to show internal directories.
Click to hide internal directories.