Documentation ¶
Overview ¶
Package preflights manages running host preflights on remote hosts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SerializeSpec ¶
func SerializeSpec(spec *v1beta2.HostPreflightSpec) ([]byte, error)
SerializeSpec serialize the provided spec inside a HostPreflight object and returns the byte slice.
func UnserializeSpec ¶
func UnserializeSpec(data []byte) (*v1beta2.HostPreflightSpec, error)
UnserializeSpec unserializes an HostPreflightSpec from a raw slice of bytes.
Types ¶
type Output ¶
type Output struct { Warn []Record `json:"warn"` Pass []Record `json:"pass"` Fail []Record `json:"fail"` }
Output is the output of a troubleshoot preflight check as returned by `preflight --format=json`. It just wraps a list of results, aka records, classified by status.
func OutputFromReader ¶
OutputFromReader reads the provided reader and returns a Output object. Expects the reader to contain a valid JSON object.
func RunLocal ¶
RunLocal runs the provided host preflight spec locally. This function is meant to be used when upgrading a local node.
func (Output) PrintTable ¶
func (o Output) PrintTable()
PrintTable prints the preflight output in a table format.
type Outputs ¶
Outputs holds a list of Output objects indexed by host address.
func (Outputs) HaveWarns ¶
HaveWarns returns true if any of the host preflight checks returned a warning.
func (Outputs) PrintTable ¶
func (o Outputs) PrintTable()
PrintTable prints the preflight output in a table format.