etcd

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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