config

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetConnection = func(c *Config, clusterID string) (connection.RemoteClusterClient, error) {
	return c.repConfig.GetConnection(clusterID)
}
View Source
var InClusterConfig = func() (*rest.Config, error) {
	return rest.InClusterConfig()
}
View Source
var Verify = func(config *replicationConfig, ctx context.Context) error {
	return config.Verify(ctx)
}

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel  string
	LogFormat string
	Lock      sync.Mutex
	// contains filtered or unexported fields
}

Config structure that combines replication configuration and current log level

func GetConfig

func GetConfig(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, recorder record.EventRecorder) (*Config, error)

GetConfig returns new instance of replication config

func (*Config) GetClusterID added in v1.1.0

func (c *Config) GetClusterID() string

GetClusterID returns cluster ID for config instance

func (*Config) GetConnection

func (c *Config) GetConnection(clusterID string) (connection.RemoteClusterClient, error)

GetConnection returns cluster client for given cluster ID

func (*Config) PrintConfig

func (c *Config) PrintConfig()

PrintConfig prints current config information.

func (*Config) UpdateConfigMap

func (c *Config) UpdateConfigMap(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, recorder record.EventRecorder) error

UpdateConfigMap updates config instance by reading mounted config

func (*Config) UpdateConfigOnSecretEvent

func (c *Config) UpdateConfigOnSecretEvent(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, secretName string, recorder record.EventRecorder) error

UpdateConfigOnSecretEvent updates config instance if update to currently used secret was made

type ControllerManagerOpts

type ControllerManagerOpts struct {
	UseConfFileFormat bool
	WatchNamespace    string
	ConfigDir         string
	ConfigFileName    string
	InCluster         bool
	Mode              string
}

ControllerManagerOpts - Controller Manager configuration

func GetControllerManagerOpts

func GetControllerManagerOpts() ControllerManagerOpts

GetControllerManagerOpts initializes and returns new ControllerManagerOpts object

Jump to

Keyboard shortcuts

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