docs/discovery/token
Madhu Venugopal 23ecada9d7 Adding export Init method for the exported discovery components
Since Swarm discovery is used by libnetwork without the swarm main(), it
is forced to use annonymous import in order to force-trigger the
unexported init() methods. Using annonymous import is highly discouraged
in a Non-Main and Non-Test packages.

Introducing exported Init() methods on these files so that libnetwork
can use Discovery as a library without having a main package.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-05-20 20:18:13 -07:00
..
README.md Doc changed to avoid errors with POST calls to Docker Hub Discovery Service API 2015-04-07 14:36:07 -07:00
token.go Adding export Init method for the exported discovery components 2015-05-20 20:18:13 -07:00
token_test.go Fix Consul and etcd with latest changes, use etcd v2.0.11 for integration tests, remove call to SyncCluster for now (breaks the integration tests) 2015-05-19 10:25:31 -07:00

README.md

#discovery-stage.hub.docker.com

Docker Swarm comes with a simple discovery service built into the Docker Hub

The discovery service is still in alpha stage and currently hosted at https://discovery-stage.hub.docker.com

#####Create a new cluster -> POST https://discovery-stage.hub.docker.com/v1/clusters

<- <token>

#####Add new nodes to a cluster -> POST https://discovery-stage.hub.docker.com/v1/clusters/<token> Request body: "<ip>:<port1>"

<- OK

-> POST https://discovery-stage.hub.docker.com/v1/clusters/<token> Request body: "<ip>:<port2>")

<- OK

#####List nodes in a cluster -> GET https://discovery-stage.hub.docker.com/v1/clusters/<token>

<- ["<ip>:<port1>", "<ip>:<port2>"]

#####Delete a cluster (all the nodes in a cluster) -> DELETE https://discovery-stage.hub.docker.com/v1/clusters/<token>

<- OK