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 ¶
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 (c *APIAddressUpdater) SetUp() (watcher.NotifyWatcher, error)
func (*APIAddressUpdater) TearDown ¶
func (c *APIAddressUpdater) TearDown() error
type APIAddresser ¶
type APIAddresser interface { APIHostPorts() ([][]network.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.
Click to show internal directories.
Click to hide internal directories.