schematic

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MPL-2.0 Imports: 5 Imported by: 11

Documentation

Overview

Package schematic provides a data model for requested image schematic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Customization

type Customization struct {
	// Extra kernel arguments to be passed to the kernel.
	ExtraKernelArgs []string `yaml:"extraKernelArgs,omitempty"`
	// Meta provides initial META contents for the image.
	Meta []MetaValue `yaml:"meta,omitempty"`
	// SystemExtensions represents the Talos system extensions to be installed.
	SystemExtensions SystemExtensions `yaml:"systemExtensions,omitempty"`
}

Customization represents the Talos image customization.

type InvalidErrorTag

type InvalidErrorTag struct{}

InvalidErrorTag is a tag for invalid schematic errors.

type MetaValue

type MetaValue struct {
	// Key is the META key.
	Key uint8 `yaml:"key"`
	// Value is the META value.
	Value string `yaml:"value"`
}

MetaValue provides initial META contents for the image.

type Schematic

type Schematic struct {
	// Customization represents the Talos image customization.
	Customization Customization `yaml:"customization"`
}

Schematic represents the requested image customization.

func Unmarshal

func Unmarshal(data []byte) (*Schematic, error)

Unmarshal the schematic from text representation.

func (*Schematic) ID

func (cfg *Schematic) ID() (string, error)

ID returns the identifier of the schematic.

ID is stable (does not change if the schematic is same). ID matches sha256 hash of the canonical representation of the schematic.

func (*Schematic) Marshal

func (cfg *Schematic) Marshal() ([]byte, error)

Marshal the schematic to text representation.

Marshal result should be stable if new schematic fields are added.

type SystemExtensions

type SystemExtensions struct {
	// OfficialExtensions represents the Talos official system extensions to be installed.
	//
	// The image factory will pick up automatically the version compatible with Talos version.
	OfficialExtensions []string `yaml:"officialExtensions,omitempty"`
}

SystemExtensions represents the Talos system extensions to be installed.

Jump to

Keyboard shortcuts

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