Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 EventType ¶
type EventType int32
EventType x ENUM( Create // Create is emitted when a new service is registered Delete // Delete is emitted when an existing service is deregsitered Update // Update is emitted when an existing servicec is updated Unknown )
const ( // EventTypeCreate is a EventType of type Create // Create is emitted when a new service is registered EventTypeCreate EventType = iota // EventTypeDelete is a EventType of type Delete // Delete is emitted when an existing service is deregsitered EventTypeDelete // EventTypeUpdate is a EventType of type Update // Update is emitted when an existing servicec is updated EventTypeUpdate // EventTypeUnknown is a EventType of type Unknown EventTypeUnknown )
func ParseMessage ¶
ParseMessage attempts to convert a string to a Message
func (EventType) MarshalText ¶
MarshalText implements the text marshaller method
type RegisterOption ¶
type RegisterOption func(*RegisterOptions)
func RegisterTTL ¶
func RegisterTTL(t time.Duration) RegisterOption
type RegisterOptions ¶
type RegistryI ¶
type RegistryI interface {
Init(...Option) *errorAVA.Error
Options() Options
Register(*Service, ...RegisterOption) *errorAVA.Error
Deregister(*Service) *errorAVA.Error
GetService(string) ([]*Service, *errorAVA.Error)
ListServices() ([]*Service, *errorAVA.Error)
Watch(...WatchOption) (WatcherI, *errorAVA.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 ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.