apiaddressupdater

package
v0.0.0-...-732aecd Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2014 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPIAddressUpdater

func NewAPIAddressUpdater(addresser APIAddresser, setter APIAddressSetter) worker.Worker

NewAPIAddressUpdater returns a worker.Worker that runs state.Cleanup() if the CleanupWatcher signals documents marked for deletion.

Types

type APIAddressSetter

type APIAddressSetter interface {
	SetAPIHostPorts(servers [][]instance.HostPort) error
}

APIAddressSetter is an interface that is provided to NewAPIAddressUpdater whose SetAPIHostPorts method will be invoked whenever address changes occur.

type APIAddressUpdater

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

APIAddressUpdater is responsible for cleaning up the state.

func (*APIAddressUpdater) Handle

func (c *APIAddressUpdater) Handle() error

func (*APIAddressUpdater) SetUp

func (*APIAddressUpdater) TearDown

func (c *APIAddressUpdater) TearDown() error

type APIAddresser

type APIAddresser interface {
	APIHostPorts() ([][]instance.HostPort, error)
	WatchAPIHostPorts() (watcher.NotifyWatcher, error)
}

APIAddresser is an interface that is provided to NewAPIAddressUpdater which can be used to watch for API address changes.

Jump to

Keyboard shortcuts

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