Documentation ¶
Index ¶
- type Discoverer
- func (d *Discoverer) Close() error
- func (d *Discoverer) Register(namespace, name, addr string, timeout time.Duration) (api.KeepAliveFunc, error)
- func (d *Discoverer) Services(namespace string) (map[string]string, error)
- func (d *Discoverer) Unregister(namespace, name string) error
- func (d *Discoverer) Version() int
- func (d *Discoverer) Watch(namespace string) (<-chan *api.Event, api.CancelFunc, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discoverer ¶
type Discoverer struct {
// contains filtered or unexported fields
}
A Discoverer object contains Client and KeysAPI
func NewWithAuth ¶
func NewWithAuth(endpoints []string, username, password string) (*Discoverer, error)
NewWithAuth need username and password
func (*Discoverer) Register ¶
func (d *Discoverer) Register(namespace, name, addr string, timeout time.Duration) (api.KeepAliveFunc, error)
Register service
func (*Discoverer) Services ¶
func (d *Discoverer) Services(namespace string) (map[string]string, error)
Services list all service
func (*Discoverer) Unregister ¶
func (d *Discoverer) Unregister(namespace, name string) error
Unregister service
func (*Discoverer) Watch ¶
func (d *Discoverer) Watch(namespace string) (<-chan *api.Event, api.CancelFunc, error)
Watch services, returns event and cancel func
Click to show internal directories.
Click to hide internal directories.