config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneWithSerialization

func CloneWithSerialization[T NumaflowControllerDefinitionConfig | GlobalConfig](orig *T) (*T, error)

Types

type ConfigManager

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

func GetConfigManagerInstance

func GetConfigManagerInstance() *ConfigManager

GetConfigManagerInstance returns a singleton config manager throughout the application

func (*ConfigManager) GetConfig

func (cm *ConfigManager) GetConfig() (GlobalConfig, error)

func (*ConfigManager) GetControllerDefinitionsMgr added in v0.2.0

func (*ConfigManager) GetControllerDefinitionsMgr() *ControllerDefinitionsManager

func (*ConfigManager) LoadAllConfigs

func (cm *ConfigManager) LoadAllConfigs(
	onErrorReloading func(error),
	options ...Option,
) error

func (*ConfigManager) RegisterCallback added in v0.2.0

func (cm *ConfigManager) RegisterCallback(f func(config GlobalConfig))

RegisterCallback adds a callback to be called when the config changes

type ControllerDefinitionsManager added in v0.2.0

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

func (*ControllerDefinitionsManager) GetControllerDefinitionsConfig added in v0.2.0

func (cm *ControllerDefinitionsManager) GetControllerDefinitionsConfig() map[string]string

func (*ControllerDefinitionsManager) RemoveControllerDefinitionConfig added in v0.2.0

func (cm *ControllerDefinitionsManager) RemoveControllerDefinitionConfig(config NumaflowControllerDefinitionConfig)

func (*ControllerDefinitionsManager) UpdateControllerDefinitionConfig added in v0.2.0

func (cm *ControllerDefinitionsManager) UpdateControllerDefinitionConfig(config NumaflowControllerDefinitionConfig)

type GlobalConfig

type GlobalConfig struct {
	LogLevel          int    `json:"logLevel" mapstructure:"logLevel"`
	IncludedResources string `json:"includedResources" mapstructure:"includedResources"`
}

GlobalConfig is the configuration for the controllers, it is supposed to be populated from the configmap attached to the controller manager.

type NumaflowControllerDefinitionConfig

type NumaflowControllerDefinitionConfig struct {
	ControllerDefinitions []apiv1.ControllerDefinitions `json:"controllerDefinitions" yaml:"controllerDefinitions"`
}

type Option

type Option func(*options)

func WithConfigFileName

func WithConfigFileName(configFileName string) Option

func WithConfigsPath

func WithConfigsPath(configsPath string) Option

Jump to

Keyboard shortcuts

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