ignition

package
v0.0.0-...-7789421 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Timeout amount of time in ms to poll the hyperv kernel device
	Timeout                   = 1000
	KvpOpRegister1            = 100
	HvSOk                     = 0
	HvKvpExchangeMaxValueSize = 2048
	HvKvpExchangeMaxKeySize   = 512
	KvpOpSet                  = 1
	// KvpKernelDevice s the hyperv kernel device used for communicating key-values pairs
	// on hyperv between the host and guest
	KvpKernelDevice = "/dev/vmbus/hv_kvp"
)

Variables

View Source
var (
	// ErrUnableToWriteToKVP is used when we are unable to write to the kernel
	// device for hyperv
	ErrUnableToWriteToKVP = errors.New("failed to write to hv_kvp")
	// ErrUnableToReadFromKVP is used when we are unable to read from the kernel
	// device for hyperv
	ErrUnableToReadFromKVP = errors.New("failed to read from hv_kvp")
	// ErrNoIgnitionKeysFound means we were unable to find key-value pairs as passed
	// from the hyperv host to this guest.
	ErrNoIgnitionKeysFound = errors.New("unable to find ignition keys")
)
View Source
var (
	// Key represents the prefix key name for finding ignition file parts
	// in the key value pairs.  it normally will have an integer added to the
	// end when looking up keys sequentially
	Key = "com_coreos_ignition_kvp_"
)

Functions

func Glue

func Glue(parts Segments) (b []byte)

Glue takes an array of byte arrays which represent the values read from the kvp device and combines them into one byte array

Types

type Segments

type Segments []segment

Segments is an array of byte arrays that together make up the entirety of an ignition file.

func Dice

func Dice(k *bytes.Reader) (Segments, error)

Dice takes input and splits it into an array for byte arrays. Each part must be less than the maximum size of a kvp value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL