Back to

Package api

Latest Go to latest

The latest major version is .

Published: Apr 1, 2020 | License: Apache-2.0 | Module:


Package api manages the capabilities and features that are exposed to clients by the etcd cluster.


func EnableCapability

func EnableCapability(c Capability)

func IsCapabilityEnabled

func IsCapabilityEnabled(c Capability) bool

func UpdateCapability

func UpdateCapability(v *semver.Version)

UpdateCapability updates the enabledMap when the cluster version increases.

type Capability

type Capability string
const (
	AuthCapability  Capability = "auth"
	V3rpcCapability Capability = "v3rpc"

type Cluster

type Cluster interface {
	// ID returns the cluster ID
	ID() types.ID
	// ClientURLs returns an aggregate set of all URLs on which this
	// cluster is listening for client requests
	ClientURLs() []string
	// Members returns a slice of members sorted by their ID
	Members() []*membership.Member
	// Member retrieves a particular member based on ID, or nil if the
	// member does not exist in the cluster
	Member(id types.ID) *membership.Member
	// Version is the cluster-wide minimum major.minor version.
	Version() *semver.Version

Cluster is an interface representing a collection of members in one etcd cluster.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier