clustermanager

package
v0.0.7-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

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

func (cc *ClusterControl) Serve(ctx context.Context) error

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

type Controller interface {
	AddToManager(manager ctrl.Manager) error
	Name() string
}

Controller defines the interface for controllers that can be added to a manager

type ControllerFn

type ControllerFn func(clusterID string) Controller

type CredentialDecryptor

type CredentialDecryptor interface {
	DecryptData(in string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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