configuration

package
v0.0.0-...-b15aaae Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAllowReinstalls specifies whether reinstallation is allowed by default.
	DefaultAllowReinstalls = false

	// DefaultMaxConcurrentReconciles defines the default maximum number of concurrent reconciles.
	DefaultMaxConcurrentReconciles = 1
)

Default configuration values for ClusterInstance.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

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

Configuration defines the runtime settings for the ClusterInstance controller. These settings can be customized to control specific behaviors.

func NewDefaultConfiguration

func NewDefaultConfiguration() *Configuration

NewDefaultConfiguration creates a new Configuration instance with default settings.

func (*Configuration) FromMap

func (c *Configuration) FromMap(input map[string]string) error

FromMap updates the Configuration object based on values from a provided map. An error if any input key is unsupported or if value conversion fails.

func (*Configuration) ToMap

func (c *Configuration) ToMap() map[string]string

ToMap converts the Configuration object into a map of string keys and values.

type ConfigurationStore

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

ConfigurationStore provides thread-safe access to the runtime configuration for the ClusterInstance controller. It allows dynamic updates to configuration fields, such as reinstallation permissions and the number of concurrent reconciles.

func NewConfigurationStore

func NewConfigurationStore(initialConfig *Configuration) (*ConfigurationStore, error)

NewConfigurationStore initializes a new ConfigurationStore with the given initial configuration.

func (*ConfigurationStore) GetAllowReinstalls

func (s *ConfigurationStore) GetAllowReinstalls() bool

GetAllowReinstalls retrieves the current value of the allowReinstalls field.

func (*ConfigurationStore) GetMaxConcurrentReconciles

func (s *ConfigurationStore) GetMaxConcurrentReconciles() int

GetMaxConcurrentReconciles retrieves the current value of the maxConcurrentReconciles field.

func (*ConfigurationStore) SetAllowReinstalls

func (s *ConfigurationStore) SetAllowReinstalls(allowReinstalls bool)

SetAllowReinstalls updates the allowReinstalls field in the configuration.

func (*ConfigurationStore) SetMaxConcurrentReconciles

func (s *ConfigurationStore) SetMaxConcurrentReconciles(maxConcurrentReconciles int)

SetMaxConcurrentReconciles updates the maxConcurrentReconciles field in the configuration.

func (*ConfigurationStore) UpdateConfiguration

func (s *ConfigurationStore) UpdateConfiguration(data map[string]string) error

UpdateConfiguration applies a set of configuration changes provided as key-value pairs. Supported keys are: - "allowReinstalls": A boolean string value (true/false) indicating whether reinstallation operations are allowed. - "maxConcurrentReconciles": An integer string value specifying the maximum number of concurrent reconciles.

Returns an error if any value cannot be parsed or if an unsupported key is provided.

Jump to

Keyboard shortcuts

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