Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 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)
Click to show internal directories.
Click to hide internal directories.