config

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) LoadConfig

func (cm *ConfigManager) LoadConfig(onErrorReloading func(error), configPath, configFileName, configFileType string) error

type GlobalConfig

type GlobalConfig struct {
	ClusterName        string `json:"clusterName" mapstructure:"clusterName"`
	SyncTimeIntervalMs int    `json:"syncTimeIntervalMs" mapstructure:"syncTimeIntervalMs"`
	CascadeDeletion    bool   `json:"cascadeDeletion" mapstructure:"cascadeDeletion"`
	AutoHealEnabled    bool   `json:"autoHealEnabled" mapstructure:"autoHealEnabled"`
	IncludedResources  string `json:"includedResources" mapstructure:"includedResources"`
	// RepoCredentials maps each Git Repository Path prefix to the corresponding credentials that are needed for it
	RepoCredentials []apiv1.RepoCredential `json:"repoCredentials" mapstructure:"repoCredentials"`
	LogLevel        int                    `json:"logLevel" mapstructure:"logLevel"`
}

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

func CloneWithSerialization

func CloneWithSerialization(orig *GlobalConfig) (*GlobalConfig, error)

Jump to

Keyboard shortcuts

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