package token

import "github.com/docker/swarm/discovery/token"

Index

Functions

func Init

func Init()

Init is exported.

Types

type Discovery

type Discovery struct {
	// contains filtered or unexported fields
}

Discovery is exported.

func (*Discovery) CreateCluster

func (s *Discovery) CreateCluster() (string, error)

CreateCluster returns a unique cluster token.

func (*Discovery) Initialize

func (s *Discovery) Initialize(urltoken string, heartbeat time.Duration, ttl time.Duration, _ map[string]string) error

Initialize is exported.

func (*Discovery) Register

func (s *Discovery) Register(addr string) error

Register adds a new entry identified by the into the discovery service.

func (*Discovery) Watch

func (s *Discovery) Watch(stopCh <-chan struct{}) (<-chan discovery.Entries, <-chan error)

Watch is exported.

Source Files

token.go

Version
v1.2.9 (latest)
Published
Jun 1, 2018
Platform
linux/amd64
Imports
8 packages
Last checked
2 weeks ago

Tools for package owners.