config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 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) GetControllerDefinitionsConfig

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

func (*ConfigManager) LoadAllConfigs

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

func (*ConfigManager) RemoveControllerDefinitionConfig

func (cm *ConfigManager) RemoveControllerDefinitionConfig(config NumaflowControllerDefinitionConfig)

func (*ConfigManager) UpdateControllerDefinitionConfig

func (cm *ConfigManager) 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