swarm

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SwarmLabel is the label for the swarm annotation that stores the location of the leader
	SwarmLabel = "infrakit.leader.location"
)

Variables

This section is empty.

Functions

func NewDetector

func NewDetector(pollInterval time.Duration, client docker.APIClientCloser) *leader.Poller

NewDetector return an implementation of leader detector

func NewStore

func NewStore(c docker.APIClientCloser) leader.Store

NewStore constructs a store

Types

type Store

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

Store is the backend for storing leader location

func (Store) GetLocation

func (s Store) GetLocation() (*url.URL, error)

GetLocation returns the location of the leader

func (Store) UpdateLocation

func (s Store) UpdateLocation(location *url.URL) error

UpdateLocation writes the location to etcd.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL