config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 7 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() *NumaflowControllerDefinitionsManager

func (*ConfigManager) GetNamespaceConfig added in v0.5.0

func (cm *ConfigManager) GetNamespaceConfig(namespace string) *NamespaceConfig

func (*ConfigManager) GetUSDEConfig added in v0.4.0

func (cm *ConfigManager) GetUSDEConfig() USDEConfig

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

func (*ConfigManager) UnsetNamespaceConfig added in v0.5.0

func (cm *ConfigManager) UnsetNamespaceConfig(namespace string)

func (*ConfigManager) UnsetUSDEConfig added in v0.4.0

func (cm *ConfigManager) UnsetUSDEConfig()

func (*ConfigManager) UpdateNamespaceConfig added in v0.5.0

func (cm *ConfigManager) UpdateNamespaceConfig(namespace string, config NamespaceConfig)

func (*ConfigManager) UpdateUSDEConfig added in v0.4.0

func (cm *ConfigManager) UpdateUSDEConfig(config USDEConfig)

type GlobalConfig

type GlobalConfig struct {
	LogLevel          int    `json:"logLevel" mapstructure:"logLevel"`
	IncludedResources string `json:"includedResources" mapstructure:"includedResources"`
	// List of Numaflow Controller image names to look for
	NumaflowControllerImageNames []string `json:"numaflowControllerImageNames" mapstructure:"numaflowControllerImageNames"`
	// If user's config doesn't exist or doesn't specify strategy, this is the default
	DefaultUpgradeStrategy USDEUserStrategy `json:"defaultUpgradeStrategy" mapstructure:"defaultUpgradeStrategy"`
}

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

type NamespaceConfig added in v0.5.0

type NamespaceConfig struct {
	UpgradeStrategy USDEUserStrategy `json:"upgradeStrategy,omitempty" yaml:"upgradeStrategy,omitempty"`
}

type NumaflowControllerDefinitionConfig

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

type NumaflowControllerDefinitionsManager added in v0.4.0

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

func (*NumaflowControllerDefinitionsManager) GetNumaflowControllerDefinitionsConfig added in v0.4.0

func (cm *NumaflowControllerDefinitionsManager) GetNumaflowControllerDefinitionsConfig() map[string]string

func (*NumaflowControllerDefinitionsManager) RemoveNumaflowControllerDefinitionConfig added in v0.4.0

func (cm *NumaflowControllerDefinitionsManager) RemoveNumaflowControllerDefinitionConfig(config NumaflowControllerDefinitionConfig)

func (*NumaflowControllerDefinitionsManager) UpdateNumaflowControllerDefinitionConfig added in v0.4.0

func (cm *NumaflowControllerDefinitionsManager) UpdateNumaflowControllerDefinitionConfig(config NumaflowControllerDefinitionConfig)

type Option

type Option func(*options)

func WithConfigFileName

func WithConfigFileName(configFileName string) Option

func WithConfigsPath

func WithConfigsPath(configsPath string) Option

type SpecDataLossField added in v0.8.0

type SpecDataLossField struct {
	Path             string `json:"path" yaml:"path"`
	IncludeSubfields bool   `json:"includeSubfields,omitempty" yaml:"includeSubfields,omitempty"`
}

type USDEConfig added in v0.4.0

type USDEConfig struct {
	PipelineSpecDataLossFields   []SpecDataLossField `json:"pipelineSpecDataLossFields,omitempty" yaml:"pipelineSpecDataLossFields,omitempty"`
	ISBServiceSpecDataLossFields []SpecDataLossField `json:"isbServiceSpecDataLossFields,omitempty" yaml:"isbServiceSpecDataLossFields,omitempty"`
}

type USDEUserStrategy added in v0.6.0

type USDEUserStrategy string
const (
	ProgressiveStrategyID USDEUserStrategy = "progressive"
	PPNDStrategyID        USDEUserStrategy = "pause-and-drain"
	NoStrategyID          USDEUserStrategy = "no-strategy"
)

func (USDEUserStrategy) IsValid added in v0.7.0

func (s USDEUserStrategy) IsValid() bool

func (*USDEUserStrategy) UnmarshalJSON added in v0.6.0

func (s *USDEUserStrategy) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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