Documentation ¶
Index ¶
- func NewConsulRdiscovery(address string, cfg *consulapi.Config, c rdiscovery.Cache) (rdiscovery.Register, error)
- type ConsulRdicovery
- func (c *ConsulRdicovery) Client() (*consulapi.Client, error)
- func (c *ConsulRdicovery) Close()
- func (c *ConsulRdicovery) Deregister(node *rdiscovery.ServiceNode) error
- func (c *ConsulRdicovery) GetService(serviceName string) ([]*rdiscovery.ServiceNode, error)
- func (c *ConsulRdicovery) Register(node *rdiscovery.ServiceNode, opt *rdiscovery.Options) error
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConsulRdiscovery ¶
func NewConsulRdiscovery(address string, cfg *consulapi.Config, c rdiscovery.Cache) (rdiscovery.Register, error)
Types ¶
type ConsulRdicovery ¶
type ConsulRdicovery struct { // common part Address string // discovery side part EnableCache bool // contains filtered or unexported fields }
func (*ConsulRdicovery) Close ¶
func (c *ConsulRdicovery) Close()
func (*ConsulRdicovery) Deregister ¶
func (c *ConsulRdicovery) Deregister(node *rdiscovery.ServiceNode) error
func (*ConsulRdicovery) GetService ¶
func (c *ConsulRdicovery) GetService(serviceName string) ([]*rdiscovery.ServiceNode, error)
func (*ConsulRdicovery) Register ¶
func (c *ConsulRdicovery) Register(node *rdiscovery.ServiceNode, opt *rdiscovery.Options) error
type Watcher ¶
func NewWatcher ¶
func NewWatcher(client *consulapi.Client, cache rdiscovery.Cache) *Watcher
Click to show internal directories.
Click to hide internal directories.