multicluster

package
v0.0.0-...-7453492 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRaftConfigurationFlags

func AddRaftConfigurationFlags(set *flag.FlagSet)

Types

type Manager

type Manager interface {
	mcmanager.Manager
	GetLeader() string
	GetClusterNames() []string
	// the context passed here, when canceled will stop the cluster
	AddOrReplaceCluster(ctx context.Context, clusterName string, cl cluster.Cluster) error
}

func NewRaftRuntimeManager

func NewRaftRuntimeManager(config RaftConfiguration) (Manager, error)

type RaftCluster

type RaftCluster struct {
	Name           string
	Address        string
	KubeconfigFile string
}

type RaftConfiguration

type RaftConfiguration struct {
	Name              string
	Address           string
	Peers             []RaftCluster
	ElectionTimeout   time.Duration
	HeartbeatInterval time.Duration
	Meta              []byte

	Scheme     *runtime.Scheme
	Logger     logr.Logger
	Metrics    bool
	RestConfig *rest.Config

	// the are only used when the Insecure flag is set to false
	Insecure        bool
	CAFile          string
	PrivateKeyFile  string
	CertificateFile string

	// these are used when bootstrapping mode is enabled
	Bootstrap           bool
	KubernetesAPIServer string
	KubeconfigNamespace string
	KubeconfigName      string
}

func RaftConfigurationFromFlags

func RaftConfigurationFromFlags() (RaftConfiguration, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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