Documentation ¶
Index ¶
- Constants
- type Health
- type UtilsClient
- func (utilsClient *UtilsClient) AddMember(ncn string) (bool, error)
- func (utilsClient *UtilsClient) CloseETCDClient() error
- func (utilsClient *UtilsClient) ClusterIsHealthy() error
- func (utilsClient *UtilsClient) IsMember(ncn string) (bool, error)
- func (utilsClient *UtilsClient) RemoveMember(ncn string) (bool, error)
Constants ¶
View Source
const EtcdSecretName = "kube-etcdbackup-etcd"
EtcdSecretName - 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.
Click to show internal directories.
Click to hide internal directories.