container

package
v1.8.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

Documentation

Overview

Package container implements a wrapper which wraps all configuration documents into a single container.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

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

Container wraps all configuration documents into a single container.

func New

func New(documents ...config.Document) (*Container, error)

New creates a container out of the list of documents.

func NewReadonly

func NewReadonly(bytes []byte, documents ...config.Document) (*Container, error)

NewReadonly creates a read-only container which preserves byte representation of contents.

func NewV1Alpha1

func NewV1Alpha1(config *v1alpha1.Config) *Container

NewV1Alpha1 creates a container with (only) v1alpha1.Config document.

func (*Container) Bytes

func (container *Container) Bytes() ([]byte, error)

Bytes returns source YAML representation (if available) or does default encoding.

func (*Container) Clone

func (container *Container) Clone() coreconfig.Provider

Clone the container.

Cloned container is not readonly.

func (*Container) Cluster

func (container *Container) Cluster() config.ClusterConfig

Cluster implements config.Config interface.

func (*Container) CompleteForBoot

func (container *Container) CompleteForBoot() bool

CompleteForBoot return true if the machine config is enough to proceed with the boot process.

func (*Container) Debug

func (container *Container) Debug() bool

Debug implements config.Config interface.

func (*Container) Documents

func (container *Container) Documents() []config.Document

Documents returns all documents in the container.

Documents should not be modified.

func (*Container) EncodeBytes

func (container *Container) EncodeBytes(encoderOptions ...encoder.Option) ([]byte, error)

EncodeBytes configuration to YAML using the provided options.

func (*Container) EncodeString

func (container *Container) EncodeString(encoderOptions ...encoder.Option) (string, error)

EncodeString configuration to YAML using the provided options.

func (*Container) ExtensionServiceConfigs added in v1.7.0

func (container *Container) ExtensionServiceConfigs() []config.ExtensionServiceConfig

ExtensionServiceConfigs implements config.Config interface.

func (*Container) Machine

func (container *Container) Machine() config.MachineConfig

Machine implements config.Config interface.

func (*Container) NetworkRules added in v1.6.0

func (container *Container) NetworkRules() config.NetworkRuleConfig

NetworkRules implements config.Config interface.

func (*Container) PatchV1Alpha1 added in v1.6.7

func (container *Container) PatchV1Alpha1(patcher func(*v1alpha1.Config) error) (coreconfig.Provider, error)

PatchV1Alpha1 patches the container's v1alpha1.Config while preserving other config documents.

func (*Container) RawV1Alpha1

func (container *Container) RawV1Alpha1() *v1alpha1.Config

RawV1Alpha1 returns internal config representation for v1alpha1.Config.

func (*Container) Readonly

func (container *Container) Readonly() bool

Readonly implements config.Container interface.

func (*Container) RedactSecrets

func (container *Container) RedactSecrets(replacement string) coreconfig.Provider

RedactSecrets returns a copy of the Provider with all secrets replaced with the given string.

func (*Container) Runtime

func (container *Container) Runtime() config.RuntimeConfig

Runtime implements config.Config interface.

func (container *Container) SideroLink() config.SideroLinkConfig

SideroLink implements config.Config interface.

func (*Container) Validate

func (container *Container) Validate(mode validation.RuntimeMode, opt ...validation.Option) ([]string, error)

Validate checks configuration and returns warnings and fatal errors (as multierror).

Jump to

Keyboard shortcuts

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