Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NoAction is a NOP NoAction = Action("") // ColdReset does a cold reset ColdReset = Action("reset_cold") // WarmReset does a warm reset WarmReset = Action("reset_warm") )
View Source
const ( // IPFromDHCP denotes ip via dhcp configuration IPFromDHCP = IPSource("dhcp") // StaticIP denotes ip via static configuration StaticIP = IPSource("static") )
Variables ¶
View Source
var ActionsBySlug = map[string]Action{ "reset_cold": ColdReset, "reset_warm": WarmReset, }
ActionsBySlug is a reverse mapping of Action types
View Source
var IPSourceBySlug = map[string]IPSource{ "dhcp": IPFromDHCP, "static": StaticIP, }
IPSourceBySlug is a reverse mapping of strings to IPSource
Functions ¶
func RegisterDriver ¶
func RegisterDriver(factory DriverFactory, driver string)
RegisterDriver is called by implementations in order to register their factory function for each device they can control
func SetupLogging ¶
Types ¶
type Action ¶
type Action string
Action is used to denote the available power actions
func (*Action) UnmarshalText ¶
UnmarshalText unmarshals an Action from a textual representation
type Driver ¶
Driver is the interface to control BMCs
func NewDriverFromGinContext ¶
NewDriverFromGinContext creates a new Driver using info in the http request
type DriverFactory ¶
type DriverFactory func(context.Context, DriverOptions) (Driver, error)
DriverFactory is used to instantiate a new Driver
type DriverOptions ¶
DriverOptions contain the basic options needed to connect to device
Click to show internal directories.
Click to hide internal directories.