Documentation ¶
Overview ¶
Package registry is an interface for service discovery
Index ¶
- Variables
- type DeregisterOption
- type DeregisterOptions
- type Endpoint
- type Event
- type EventType
- type Filter
- type GetOption
- type GetOptions
- type ListOption
- type ListOptions
- type Node
- type Option
- type Options
- type RegisterOption
- type RegisterOptions
- type Registry
- type Result
- type Service
- type Value
- type WatchOption
- type WatchOptions
- type Watcher
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DeregisterOption ¶
type DeregisterOption func(*DeregisterOptions)
type DeregisterOptions ¶
type Event ¶
type Event struct { // Id is registry id Id string // Type defines type of event Type EventType // Timestamp is event timestamp Timestamp time.Time // Service is registry service Service *Service }
Event is registry event
type Filter ¶
Filter is used to filter a service during the selection process
func FilterEndpoint ¶
FilterEndpoint is an endpoint based Next Filter which will only return services with the endpoint specified.
func FilterLabel ¶
FilterLabel is a label based Next Filter which will only return services with the label specified.
func FilterVersion ¶
FilterVersion is a version based Next Filter which will only return services with the version specified.
type GetOption ¶
type GetOption func(*GetOptions)
type GetOptions ¶
type ListOption ¶
type ListOption func(*ListOptions)
type ListOptions ¶
type RegisterOption ¶
type RegisterOption func(*RegisterOptions)
func RegisterTTL ¶
func RegisterTTL(t time.Duration) RegisterOption
type RegisterOptions ¶
type Registry ¶
type Registry interface { Options() Options Register(*Service, ...RegisterOption) error Deregister(*Service) error GetService(string) ([]*Service, error) ListServices() ([]*Service, error) Watch(...WatchOption) (Watcher, error) String() string }
The registry provides an interface for service discovery and an abstraction over varying implementations {consul, etcd, zookeeper, ...}
type Result ¶
Result is returned by a call to Next on the watcher. Actions can be create, update, delete
type WatchOption ¶
type WatchOption func(*WatchOptions)
type WatchOptions ¶
Directories ¶
Path | Synopsis |
---|---|
Package cache provides a registry cache
|
Package cache provides a registry cache |
Package etcd provides an etcd service registry
|
Package etcd provides an etcd service registry |
Package mdns is a multicast dns registry Package mdns provides a multicast dns registry
|
Package mdns is a multicast dns registry Package mdns provides a multicast dns registry |
Package memory provides an in-memory registry
|
Package memory provides an in-memory registry |