etcd

package
v0.7.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2020 License: MPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.7.0

type Client struct {
	*clientv3.Client
}

Client is a wrapper around the official etcd client.

func NewClient

func NewClient(endpoints []string) (client *Client, err error)

NewClient initializes and returns an etcd client configured to talk to a local endpoint.

func NewClientFromControlPlaneIPs

func NewClientFromControlPlaneIPs(ctx context.Context, creds *x509.PEMEncodedCertificateAndKey, endpoint *url.URL) (client *Client, err error)

NewClientFromControlPlaneIPs initializes and returns an etcd client configured to talk to all members.

func (*Client) ForfeitLeadership added in v0.7.0

func (c *Client) ForfeitLeadership(ctx context.Context) (string, error)

ForfeitLeadership transfers leadership from the current member to another member.

nolint: gocyclo

func (*Client) LeaveCluster added in v0.7.0

func (c *Client) LeaveCluster(ctx context.Context) error

LeaveCluster removes the current member from the etcd cluster.

nolint: gocyclo

func (*Client) ValidateForUpgrade added in v0.7.0

func (c *Client) ValidateForUpgrade(ctx context.Context, config config.Provider, preserve bool) error

ValidateForUpgrade validates the etcd cluster state to ensure that performing an upgrade is safe.

Jump to

Keyboard shortcuts

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