Documentation
¶
Index ¶
- type ClusterControl
- type ClusterManager
- type ClusterManagerConfig
- type ClusterManagerImpl
- func (cm *ClusterManagerImpl) GetClient(clusterID string) (client.Client, error)
- func (cm *ClusterManagerImpl) GetRestConfig(clusterID string) (*rest.Config, error)
- func (cm *ClusterManagerImpl) IsClusterRegistered(clusterID string) bool
- func (cm *ClusterManagerImpl) IsRunning() bool
- func (cm *ClusterManagerImpl) ReRegisterCluster(cluster *models.Cluster) error
- func (cm *ClusterManagerImpl) RegisterCluster(cluster *models.Cluster) error
- func (cm *ClusterManagerImpl) Start(ctx context.Context)
- func (cm *ClusterManagerImpl) Stop(ctx context.Context) error
- func (cm *ClusterManagerImpl) UnregisterCluster(clusterID string) error
- type Controller
- type ControllerFn
- type CredentialDecryptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterControl ¶
type ClusterControl struct {
// contains filtered or unexported fields
}
ClusterControl represents a control structure for a single cluster
func (*ClusterControl) String ¶
func (cc *ClusterControl) String() string
type ClusterManager ¶
type ClusterManager interface {
RegisterCluster(cluster *models.Cluster) error
GetClient(clusterID string) (client.Client, error)
GetRestConfig(clusterID string) (*rest.Config, error)
IsClusterRegistered(clusterID string) bool
UnregisterCluster(clusterID string) error
ReRegisterCluster(cluster *models.Cluster) error
Start(ctx context.Context)
Stop(ctx context.Context) error
IsRunning() bool
}
ClusterManager defines the interface for managing clusters
func NewClusterManager ¶
func NewClusterManager(config ClusterManagerConfig) ClusterManager
NewClusterManager creates a new ClusterManager instance
type ClusterManagerConfig ¶
type ClusterManagerConfig struct {
LeadershipFlag *leadership.Flag
ControllersToRegister []ControllerFn
CredentialDecryptor CredentialDecryptor
Logger logger.Logger
}
ClusterManagerConfig holds configuration for creating a new ClusterManager
type ClusterManagerImpl ¶
type ClusterManagerImpl struct {
// contains filtered or unexported fields
}
ClusterManagerImpl implements the ClusterManager interface
func (*ClusterManagerImpl) GetClient ¶
func (cm *ClusterManagerImpl) GetClient(clusterID string) (client.Client, error)
GetClient retrieves the client for a given cluster
func (*ClusterManagerImpl) GetRestConfig ¶
func (cm *ClusterManagerImpl) GetRestConfig(clusterID string) (*rest.Config, error)
GetRestConfig retrieves the rest config for a given cluster
func (*ClusterManagerImpl) IsClusterRegistered ¶
func (cm *ClusterManagerImpl) IsClusterRegistered(clusterID string) bool
IsClusterRegistered checks if a cluster is registered
func (*ClusterManagerImpl) IsRunning ¶
func (cm *ClusterManagerImpl) IsRunning() bool
IsRunning checks if the cluster manager is currently running
func (*ClusterManagerImpl) ReRegisterCluster ¶
func (cm *ClusterManagerImpl) ReRegisterCluster(cluster *models.Cluster) error
ReRegisterCluster tears down an existing cluster registration and registers it again
func (*ClusterManagerImpl) RegisterCluster ¶
func (cm *ClusterManagerImpl) RegisterCluster(cluster *models.Cluster) error
RegisterCluster registers a new cluster with the manager
func (*ClusterManagerImpl) Start ¶
func (cm *ClusterManagerImpl) Start(ctx context.Context)
Start begins the cluster manager operations
func (*ClusterManagerImpl) Stop ¶
func (cm *ClusterManagerImpl) Stop(ctx context.Context) error
Stop halts the cluster manager operations
func (*ClusterManagerImpl) UnregisterCluster ¶
func (cm *ClusterManagerImpl) UnregisterCluster(clusterID string) error
UnregisterCluster removes a cluster from the manager
type Controller ¶
Controller defines the interface for controllers that can be added to a manager
type ControllerFn ¶
type ControllerFn func(clusterID string) Controller