config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DropInConfigProvider

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

DropInConfigProvider reads a base certificate configuration file and merges overrides from a derived ".d" directory. Certificates are keyed by Name; a drop-in with the same certificate name overrides the base definition. Example:

  • Base: /etc/flightctl/certs.yaml
  • Drop-ins dir: /etc/flightctl/certs.d/

All files in the drop-ins dir with .yaml/.yml extensions are applied in lexical order. Only YAML is supported for base and drop-ins.

func NewDropInConfigProvider

func NewDropInConfigProvider(rw fileio.ReadWriter, basePath string) *DropInConfigProvider

NewDropInConfigProvider creates a configuration provider that loads a base YAML config and merges any drop-ins from a derived ".d" directory. Drop-ins override base certificates by matching Name.

func (*DropInConfigProvider) GetCertificateConfigs

func (p *DropInConfigProvider) GetCertificateConfigs() ([]provider.CertificateConfig, error)

GetCertificateConfigs loads the base YAML (optional) and merges drop-ins from "<basename>.d/" (e.g., /etc/flightctl/certs.d/). Drop-ins override base by Name.

func (*DropInConfigProvider) Name

func (p *DropInConfigProvider) Name() string

Name returns the unique identifier for this provider, including the base path

type StaticConfigProvider

type StaticConfigProvider struct {
	// Static list of certificate configurations
	Certificates []provider.CertificateConfig
}

StaticConfigProvider provides certificate configurations from a static in-memory list. This is useful for testing, development, or scenarios where certificate configurations are known at compile time and don't need to change dynamically.

func NewStaticConfigProvider

func NewStaticConfigProvider(cc []provider.CertificateConfig) *StaticConfigProvider

NewStaticConfigProvider creates a new static configuration provider with the given certificate configurations. The configurations are stored in memory and remain constant.

func (*StaticConfigProvider) GetCertificateConfigs

func (p *StaticConfigProvider) GetCertificateConfigs() ([]provider.CertificateConfig, error)

GetCertificateConfigs returns the static list of certificate configurations. This list never changes and is set during provider creation.

func (*StaticConfigProvider) Name

func (p *StaticConfigProvider) Name() string

Name returns the unique identifier for this configuration provider. Static providers always use the same name since they don't have variable parameters.

Jump to

Keyboard shortcuts

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