Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Get, Set and GetAll are defined here as variables so they can be overridden for testing, or for using a key-value store other than VPD.
Functions ¶
This section is empty.
Types ¶
type BootEntry ¶
BootEntry represents a boot entry, with its name, configuration, and Booter instance. It can map to existing key-value stores like VPD or EFI vars.
func GetBootEntries ¶
func GetBootEntries() []BootEntry
GetBootEntries returns a list of BootEntry objects stored in the VPD partition of the flash chip
type Booter ¶
Booter is an interface that defines custom boot types. Implementations can be like network boot, local boot, etc.
func GetBooterFor ¶
GetBooterFor looks for a supported Booter implementation and returns it, if found. If not found, a NullBooter is returned.
func NewLocalBooter ¶
NewLocalBooter parses a boot entry config and returns a Booter instance, or an error if any
func NewNetBooter ¶
NewNetBooter parses a boot entry config and returns a Booter instance, or an error if any
type LocalBooter ¶
type LocalBooter struct { Type string `json:"type"` Method string `json:"method"` DeviceGUID string `json:"device_guid"` Kernel string `json:"kernel,omitempty"` KernelArgs string `json:"kernel_args,omitempty"` Initramfs string `json:"ramfs,omitempty"` }
LocalBooter implements the Booter interface for booting from local storage.
func (*LocalBooter) Boot ¶
func (lb *LocalBooter) Boot() error
Boot will run the boot procedure. In the case of LocalBooter, it will call the `localboot` command
func (*LocalBooter) TypeName ¶
func (lb *LocalBooter) TypeName() string
TypeName returns the name of the booter type
type NetBooter ¶
type NetBooter struct { Type string `json:"type"` Method string `json:"method"` MAC string `json:"mac"` OverrideURL *string `json:"override_url,omitempty"` Retries *int `json:"retries,omitempty"` DebugOnFailure bool `json:"debug_on_failure,omitempty"` }
NetBooter implements the Booter interface for booting over DHCPv6. See NewNetBooterDHCPv6 for details on the fields.
type NullBooter ¶
type NullBooter struct { }
NullBooter is a dummy booter that does nothing. It is used when no other booter has been found
func (*NullBooter) Boot ¶
func (nb *NullBooter) Boot() error
Boot will run the boot procedure. In the case of this NullBooter it will do nothing
func (*NullBooter) TypeName ¶
func (nb *NullBooter) TypeName() string
TypeName returns the name of the booter type