etcd

package
v1.36.6 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const SecretName = "kube-etcdbackup-etcd"

SecretName - Name of the secret containing the etcd keys.

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Health string `json:"health"`
}

Health - Structure to support unmarshalling health payload from etcd.

type UtilsClient

type UtilsClient struct {
	Endpoints []string
	// contains filtered or unexported fields
}

UtilsClient - Structure for etcd client.

func NewETCDClient

func NewETCDClient(
	endpoints []string, kubeconfig string,
) (
	utilsClient *UtilsClient, err error,
)

NewETCDClient - Creates a new etcd client.

func (*UtilsClient) AddMember

func (utilsClient *UtilsClient) AddMember(ncn string) (
	bool, error,
)

AddMember - Adds an NCN to the etcd cluster.

func (*UtilsClient) CloseETCDClient

func (utilsClient *UtilsClient) CloseETCDClient() error

CloseETCDClient - Closes the current etcd client.

func (*UtilsClient) ClusterIsHealthy

func (utilsClient *UtilsClient) ClusterIsHealthy() error

ClusterIsHealthy - Returns true if the etcd cluster is healthy.

func (*UtilsClient) IsMember

func (utilsClient *UtilsClient) IsMember(ncn string) (
	bool, error,
)

IsMember - Returns true if the given NCN (of the format ncn-mXXX) is a member of the etcd cluster.

func (*UtilsClient) RemoveMember

func (utilsClient *UtilsClient) RemoveMember(ncn string) (
	bool, error,
)

RemoveMember - Removes the given NCN from the etcd cluster.

Jump to

Keyboard shortcuts

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