Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discoverier ¶
type Discoverier interface { Connect() error Close() error Fetch() ([]*v1.RbdEndpoint, error) Watch() }
Discoverier is the interface that wraps the required methods to gather information about third-party service endpoints.
func NewDiscoverier ¶
func NewDiscoverier(cfg *model.ThirdPartySvcDiscoveryCfg, updateCh *channels.RingChannel, stopCh chan struct{}) (Discoverier, error)
NewDiscoverier creates a new Discoverier.
func NewEtcd ¶
func NewEtcd(cfg *model.ThirdPartySvcDiscoveryCfg, updateCh *channels.RingChannel, stopCh chan struct{}) Discoverier
NewEtcd creates a new Discorvery which implemeted by etcd.
type Event ¶
type Event struct { Type EventType Obj interface{} }
Event holds the context of an event.
type EventType ¶
type EventType string
EventType type of event
const ( // CreateEvent event associated with new objects in a service discovery center CreateEvent EventType = "CREATE" // UpdateEvent event associated with an object update in a service discovery center UpdateEvent EventType = "UPDATE" // DeleteEvent event associated when an object is removed from a service discovery center DeleteEvent EventType = "DELETE" // UnhealthyEvent - UnhealthyEvent EventType = "UNHEALTHY" // HealthEvent - HealthEvent EventType = "HEALTH" )
Click to show internal directories.
Click to hide internal directories.