etcd

package
v0.0.0-...-af52fa7 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	// List enumerates the current cluster membership.
	List(ctx context.Context) ([]etcdclient.Member, error)

	// Add instructs etcd to accept a new Member into the cluster.
	Add(ctx context.Context, peerURL string) (*etcdclient.Member, error)

	// Remove demotes an existing Member out of the cluster.
	Remove(ctx context.Context, mID string) error

	// GetVersion retrieves the current etcd server and cluster version
	GetVersion(ctx context.Context) (*version.Versions, error)
}

API contains only the ETCD APIs that we use in the operator to allow for testing fakes.

type APIBuilder

type APIBuilder interface {
	New(etcdclient.Config) (API, error)
}

APIBuilder is used to connect to etcd in the first place

type ClientEtcdAPI

type ClientEtcdAPI struct {
	etcdclient.MembersAPI
	etcdclient.Client
}

type ClientEtcdAPIBuilder

type ClientEtcdAPIBuilder struct{}

func (*ClientEtcdAPIBuilder) New

func (o *ClientEtcdAPIBuilder) New(config etcdclient.Config) (API, error)

Jump to

Keyboard shortcuts

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