Documentation ¶
Index ¶
- func New(source string, targets ...string) connection.MultiClusterClient
- func NewFakeConfig(source string, targets ...string) connection.MultiClusterClient
- func NewFakeConfigForSingleCluster(selfClient client.Client, source string, targets ...string) connection.MultiClusterClient
- type Config
- func (c *Config) GetClusterID() string
- func (c *Config) GetConnection(clusterID string) (connection.RemoteClusterClient, error)
- func (c *Config) PrintConfig(log logr.Logger)
- func (c *Config) UpdateConfigMap(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, ...) error
- func (c *Config) UpdateConfigOnSecretEvent(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, ...) error
- type ControllerManagerOpts
- type FakeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(source string, targets ...string) connection.MultiClusterClient
New creates new fake config with prepopulated parameters
func NewFakeConfig ¶
func NewFakeConfig(source string, targets ...string) connection.MultiClusterClient
NewFakeConfig returns new FakeClient with initialized fake remote clients
func NewFakeConfigForSingleCluster ¶
func NewFakeConfigForSingleCluster(selfClient client.Client, source string, targets ...string) connection.MultiClusterClient
NewFakeConfigForSingleCluster returns new FakeClient configured to be used in single-cluster scenario
Types ¶
type Config ¶
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, log logr.Logger) (*Config, error)
GetConfig returns new instance of replication config
func (*Config) GetClusterID ¶ added in v1.1.0
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 ¶
PrintConfig prints current config information using provided logger interface
func (*Config) UpdateConfigMap ¶
func (c *Config) UpdateConfigMap(ctx context.Context, client ctrlClient.Client, opts ControllerManagerOpts, recorder record.EventRecorder, log logr.Logger) 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, log logr.Logger) 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
type FakeConfig ¶
type FakeConfig struct {
// contains filtered or unexported fields
}
FakeConfig is a structure that implements MultiClusterClient interface providing dummy functionality
func (*FakeConfig) GetClusterID ¶ added in v1.1.0
func (c *FakeConfig) GetClusterID() string
GetClusterID returns ID of fake cluster
func (*FakeConfig) GetConnection ¶
func (c *FakeConfig) GetConnection(clusterID string) (connection.RemoteClusterClient, error)
GetConnection returns fake connection remote client