Version: v1.0.0 Latest Latest

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

Go to latest
Published: Jun 18, 2015 License: Apache-2.0 Imports: 16 Imported by: 0



Package discovery provides an implementation of the cluster discovery that is used by etcd.



This section is empty.


View Source
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")
	ErrFullCluster    = errors.New("discovery: cluster is full")
	ErrTooManyRetries = errors.New("discovery: too many retries")


func GetCluster added in v0.4.4

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 added in v0.4.4

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

func SRVGetCluster added in v0.4.4

func SRVGetCluster(name, dns string, defaultToken string, apurls types.URLs) (string, string, error)

TODO(barakmich): Currently ignores priority and weight (as they don't make as much sense for a bootstrap) Also doesn't do any lookups for the token (though it could) Also sees each entry as a separate instance.


This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL