Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Instance ¶
type Instance struct {
Address string
// InUse is true if this instance should be actively used. For example, if a service discovery
// implementation enforced a max number of instances to be used, this flag will be set to true
// only on a number of instances up to the configured max.
InUse bool
}
Instance notified by the service discovery.
type Notifications ¶
type Notifications interface {
// InstanceAdded is called each time a new instance has been discovered.
InstanceAdded(instance Instance)
// InstanceRemoved is called each time an instance that was previously notified by AddressAdded()
// is no longer available.
InstanceRemoved(instance Instance)
// InstanceChanged is called each time an instance that was previously notified by AddressAdded()
// has changed its InUse value.
InstanceChanged(instance Instance)
}
Notifications about address resolution. All notifications are sent on the same goroutine.
Click to show internal directories.
Click to hide internal directories.