Documentation ¶
Index ¶
- Variables
- type BootBooter
- type BootEntry
- type Booter
- func GetBooterFor(entry BootEntry, l ulog.Logger) (Booter, error)
- func NewBootBooter(config []byte, l ulog.Logger) (Booter, error)
- func NewLocalBooter(config []byte, l ulog.Logger) (Booter, error)
- func NewNetBooter(config []byte, l ulog.Logger) (Booter, error)
- func NewPxeBooter(config []byte, l ulog.Logger) (Booter, error)
- type LocalBooter
- type NetBooter
- type PxeBooter
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 BootBooter ¶ added in v0.12.0
type BootBooter struct { Type string `json:"type"` DeviceIgnore string `json:"device_ignore"` KernelAppend string `json:"kernel_append"` KernelRemove string `json:"kernel_remove"` KernelReuse string `json:"kernel_reuse"` }
Boot implements the Booter interface for booting from local storage.
func (*BootBooter) Boot ¶ added in v0.12.0
func (lb *BootBooter) Boot(debugEnabled bool) error
Boot will run the boot procedure. In the case of BootBooter, it will call the `boot` command
func (*BootBooter) TypeName ¶ added in v0.12.0
func (lb *BootBooter) TypeName() string
TypeName returns the name of the booter type
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 ¶
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. Boolean debugEnabled can be used to turning on/off the Booter debugging log.
func GetBooterFor ¶
GetBooterFor looks for a supported Booter implementation and returns it, if found. If not found, error errNoBooterFound is returned.
func NewBootBooter ¶ added in v0.12.0
NewBootBooter parses a boot entry config and returns a Booter instance, or an error if any
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(debugEnabled bool) 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 PxeBooter ¶ added in v0.12.0
type PxeBooter struct { Type string `json:"type"` IPV6 string `json:"ipv6"` IPV4 string `json:"ipv4"` Server string `json:"server"` File string `json:"file"` Cmd string `json:"cmd"` }
PxeBooter implements the Booter interface for booting PXE