configloader

package
v1.9.1 Latest Latest
Warning

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

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

Documentation

Overview

Package configloader provides methods to load Talos config.

Index

Constants

This section is empty.

Variables

View Source
var ErrLookupFailed = decoder.ErrLookupFailed

ErrLookupFailed is returned when the lookup failed.

View Source
var ErrNoConfig = errors.New("config not found")

ErrNoConfig is returned when no configuration was found in the input.

View Source
var ErrZeroedDocument = decoder.ErrZeroedDocument

ErrZeroedDocument is returned when the document is empty after applying the delete selector.

Functions

func NewFromBytes

func NewFromBytes(source []byte, o ...Opt) (config.Provider, error)

NewFromBytes will take a byteslice and attempt to parse a config file from it.

func NewFromFile

func NewFromFile(filepath string) (config.Provider, error)

NewFromFile will take a filepath and attempt to parse a config file from it.

func NewFromStdin

func NewFromStdin() (config.Provider, error)

NewFromStdin initializes a config provider by reading from stdin.

Types

type Opt added in v1.8.0

type Opt func(*Opts)

Opt is a functional option for the config loader.

func WithAllowPatchDelete added in v1.8.0

func WithAllowPatchDelete() Opt

WithAllowPatchDelete allows the loader to parse patch delete operations.

type Opts added in v1.8.0

type Opts struct {
	// contains filtered or unexported fields
}

Opts represents the options for the config loader.

type Selector added in v1.8.0

type Selector = decoder.Selector

Selector represents a delete selector for a document.

Directories

Path Synopsis
internal
decoder
Package decoder provides a YAML decoder for machine configuration documents.
Package decoder provides a YAML decoder for machine configuration documents.

Jump to

Keyboard shortcuts

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