Documentation ¶
Index ¶
- Constants
- type DiscoveryCallbacks
- type DiscoveryEvent
- type EtcdDiscovery
- func (d *EtcdDiscovery) Close() error
- func (d *EtcdDiscovery) DrainServices(ctx context.Context) error
- func (d *EtcdDiscovery) ListServices() []Service
- func (d *EtcdDiscovery) Register(ctx context.Context) error
- func (d *EtcdDiscovery) UnRegister(ctx context.Context) error
- func (d *EtcdDiscovery) Watch(ctx context.Context) error
- type EtcdDiscoveryConfig
- type Service
Constants ¶
View Source
const ( PutEvent = "PUT" DeleteEvent = "DELETE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoveryCallbacks ¶
type DiscoveryCallbacks struct { OnStartedDiscovering func(services []Service) OnServiceChanged func(services []Service, event DiscoveryEvent) OnStoppedDiscovering func() }
type DiscoveryEvent ¶
type EtcdDiscovery ¶
type EtcdDiscovery struct { EtcdDiscoveryConfig // contains filtered or unexported fields }
func New ¶
func New(config EtcdDiscoveryConfig) (*EtcdDiscovery, error)
func (*EtcdDiscovery) Close ¶
func (d *EtcdDiscovery) Close() error
func (*EtcdDiscovery) DrainServices ¶
func (d *EtcdDiscovery) DrainServices(ctx context.Context) error
func (*EtcdDiscovery) ListServices ¶
func (d *EtcdDiscovery) ListServices() []Service
func (*EtcdDiscovery) UnRegister ¶
func (d *EtcdDiscovery) UnRegister(ctx context.Context) error
type EtcdDiscoveryConfig ¶
Click to show internal directories.
Click to hide internal directories.