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.