Documentation
¶
Index ¶
- Constants
- type Configuration
- type ConfigurationStore
- func (s *ConfigurationStore) GetAllowReinstalls() bool
- func (s *ConfigurationStore) GetMaxConcurrentReconciles() int
- func (s *ConfigurationStore) SetAllowReinstalls(allowReinstalls bool)
- func (s *ConfigurationStore) SetMaxConcurrentReconciles(maxConcurrentReconciles int)
- func (s *ConfigurationStore) UpdateConfiguration(data map[string]string) error
Constants ¶
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.