kubernetes/vendor/go.etcd.io/etcd/server/v3/etcdserver/api/v2discovery/discovery.go

var ErrInvalidURL

var ErrBadSizeKey

var ErrSizeNotFound

var ErrTokenNotFound

var ErrDuplicateID

var ErrDuplicateName

var ErrFullCluster

var ErrTooManyRetries

var ErrBadDiscoveryEndpoint

var nRetries

var maxExpoentialRetries

// JoinCluster will connect to the discovery service at the given url, and
// register the server represented by the given id and config to the cluster
func JoinCluster(lg *zap.Logger, durl, dproxyurl string, id types.ID, config string) (string, error) {}

// GetCluster will connect to the discovery service at the given url and
// retrieve a string describing the cluster
func GetCluster(lg *zap.Logger, durl, dproxyurl string) (string, error) {}

type discovery

// newProxyFunc builds a proxy function from the given string, which should
// represent a URL that can be used as a proxy. It performs basic
// sanitization of the URL and returns any error encountered.
func newProxyFunc(lg *zap.Logger, proxy string) (func(*http.Request) (*url.URL, error), error) {}

func newDiscovery(lg *zap.Logger, durl, dproxyurl string, id types.ID) (*discovery, error) {}

func (d *discovery) joinCluster(config string) (string, error) {}

func (d *discovery) getCluster() (string, error) {}

func (d *discovery) createSelf(contents string) error {}

func (d *discovery) checkCluster() ([]*client.Node, uint64, uint64, error) {}

func (d *discovery) logAndBackoffForRetry(step string) {}

func (d *discovery) checkClusterRetry() ([]*client.Node, uint64, uint64, error) {}

func (d *discovery) waitNodesRetry() ([]*client.Node, error) {}

func (d *discovery) waitNodes(nodes []*client.Node, size uint64, index uint64) ([]*client.Node, error) {}

func (d *discovery) selfKey() string {}

func nodesToCluster(ns []*client.Node, size uint64) (string, error) {}

type sortableNodes

func (ns sortableNodes) Len() int {}

func (ns sortableNodes) Less(i, j int) bool {}

func (ns sortableNodes) Swap(i, j int) {}