Package discovery provides an implementation of the cluster discovery that is used by etcd.
Internal call graph ▹
Internal call graph ▾
In the call graph viewer below, each node is a function belonging to this package and its children are the functions it calls—perhaps dynamically.
The root nodes are the entry points of the package: functions that may be called from outside the package. There may be non-exported or anonymous functions among them if they are called dynamically from another package.
Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring
Functions may be omitted if they were determined to be unreachable in the particular programs or tests that were analyzed.
var ( ErrInvalidURL = errors.New("discovery: invalid URL") ErrBadSizeKey = errors.New("discovery: size key is bad") ErrSizeNotFound = errors.New("discovery: size key not found") ErrTokenNotFound = errors.New("discovery: token not found") ErrDuplicateID = errors.New("discovery: found duplicate id") ErrDuplicateName = errors.New("discovery: found duplicate name") ErrFullCluster = errors.New("discovery: cluster is full") ErrTooManyRetries = errors.New("discovery: too many retries") ErrBadDiscoveryEndpoint = errors.New("discovery: bad discovery endpoint") )
func GetCluster ¶
func GetCluster(durl, dproxyurl string) (string, error)
GetCluster will connect to the discovery service at the given url and retrieve a string describing the cluster
func JoinCluster ¶
func JoinCluster(durl, dproxyurl string, id types.ID, config string) (string, error)
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