Documentation ¶
Overview ¶
Package container implements a wrapper which wraps all configuration documents into a single container.
Index ¶
- type Container
- func (container *Container) Bytes() ([]byte, error)
- func (container *Container) Clone() coreconfig.Provider
- func (container *Container) Cluster() config.ClusterConfig
- func (container *Container) CompleteForBoot() bool
- func (container *Container) Debug() bool
- func (container *Container) Documents() []config.Document
- func (container *Container) EncodeBytes(encoderOptions ...encoder.Option) ([]byte, error)
- func (container *Container) EncodeString(encoderOptions ...encoder.Option) (string, error)
- func (container *Container) ExtensionServiceConfigs() []config.ExtensionServiceConfig
- func (container *Container) KubespanConfig() config.KubespanConfig
- func (container *Container) Machine() config.MachineConfig
- func (container *Container) NetworkRules() config.NetworkRuleConfig
- func (container *Container) PatchV1Alpha1(patcher func(*v1alpha1.Config) error) (coreconfig.Provider, error)
- func (container *Container) RawV1Alpha1() *v1alpha1.Config
- func (container *Container) Readonly() bool
- func (container *Container) RedactSecrets(replacement string) coreconfig.Provider
- func (container *Container) Runtime() config.RuntimeConfig
- func (container *Container) RuntimeValidate(ctx context.Context, st state.State, mode validation.RuntimeMode, ...) ([]string, error)
- func (container *Container) SideroLink() config.SideroLinkConfig
- func (container *Container) TrustedRoots() config.TrustedRootsConfig
- func (container *Container) Validate(mode validation.RuntimeMode, opt ...validation.Option) ([]string, error)
- func (container *Container) Volumes() config.VolumesConfig
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 NewReadonly ¶
NewReadonly creates a read-only container which preserves byte representation of contents.
func NewV1Alpha1 ¶
NewV1Alpha1 creates a container with (only) v1alpha1.Config document.
func (*Container) Bytes ¶
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 ¶
CompleteForBoot return true if the machine config is enough to proceed with the boot process.
func (*Container) Documents ¶
Documents returns all documents in the container.
Documents should not be modified.
func (*Container) EncodeBytes ¶
EncodeBytes configuration to YAML using the provided options.
func (*Container) EncodeString ¶
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) KubespanConfig ¶ added in v1.8.0
func (container *Container) KubespanConfig() config.KubespanConfig
KubespanConfig 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 ¶
RawV1Alpha1 returns internal config representation for v1alpha1.Config.
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) RuntimeValidate ¶
func (container *Container) RuntimeValidate(ctx context.Context, st state.State, mode validation.RuntimeMode, opt ...validation.Option) ([]string, error)
RuntimeValidate validates the config in the runtime context.
func (*Container) SideroLink ¶
func (container *Container) SideroLink() config.SideroLinkConfig
SideroLink implements config.Config interface.
func (*Container) TrustedRoots ¶ added in v1.8.0
func (container *Container) TrustedRoots() config.TrustedRootsConfig
TrustedRoots 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).
func (*Container) Volumes ¶ added in v1.8.0
func (container *Container) Volumes() config.VolumesConfig
Volumes implements config.Config interface.