meta

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package meta provides interfaces for encoding and decoding META values.

Index

Constants

View Source
const (
	// Upgrade is the upgrade tag.
	Upgrade = iota + 6
	// StagedUpgradeImageRef stores image reference for staged upgrade.
	StagedUpgradeImageRef
	// StagedUpgradeInstallOptions stores JSON-serialized install.Options.
	StagedUpgradeInstallOptions
	// StateEncryptionConfig stores JSON-serialized v1alpha1.Encryption.
	StateEncryptionConfig
	// MetalNetworkPlatformConfig stores serialized NetworkPlatformConfig for the `metal` platform.
	MetalNetworkPlatformConfig
	// DownloadURLCode stores the value of the `${code}` variable in the download URL for talos.config= URL.
	DownloadURLCode
	// UserReserved1 is reserved for user-defined metadata.
	UserReserved1
	// UserReserved2 is reserved for user-defined metadata.
	UserReserved2
	// UserReserved3 is reserved for user-defined metadata.
	UserReserved3
	// UUIDOverride stores the UUID that this machine will use instead of the one from the hardware.
	UUIDOverride
	// UniqueMachineToken store the unique token for this machine. It's useful because UUID may repeat or be filled with zeros.
	UniqueMachineToken
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Value

type Value struct {
	Key   uint8
	Value string
}

Value represents a key/value pair for META.

func (*Value) Parse

func (v *Value) Parse(s string) error

Parse k=v expression.

func (Value) String

func (v Value) String() string

type Values

type Values []Value

Values is a collection of Value.

func DecodeValues

func DecodeValues(s string) (Values, error)

DecodeValues parses a string representation of Values for the environment variable.

See Encode for the details of the encoding.

func (Values) Encode

func (v Values) Encode(allowGzip bool) string

Encode returns a string representation of Values for the environment variable.

Each Value is encoded a k=v, split by ';' character. The result is base64 encoded.

Jump to

Keyboard shortcuts

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