Documentation ¶
Index ¶
- func NewServerDiscovery(serviceName string, serviceList []string, port uint64) servicediscovery.IServiceDiscovery
- type MemoryCache
- type Registrar
- func (registrar *Registrar) Destroy() error
- func (registrar *Registrar) GetAllInstances(serviceName string) []servicediscovery.ServiceInstance
- func (registrar *Registrar) GetAllServices() ([]*servicediscovery.Service, error)
- func (registrar *Registrar) GetHealthyInstances(serviceName string) []servicediscovery.ServiceInstance
- func (registrar *Registrar) GetName() string
- func (registrar *Registrar) Register() error
- func (registrar *Registrar) Unregister() error
- func (registrar *Registrar) Update() error
- func (registrar *Registrar) Watch(opts ...servicediscovery.WatchOption) (servicediscovery.Watcher, error)
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServerDiscovery ¶
func NewServerDiscovery(serviceName string, serviceList []string, port uint64) servicediscovery.IServiceDiscovery
Types ¶
type MemoryCache ¶ added in v1.6.7
func (*MemoryCache) GetService ¶ added in v1.6.7
func (memoryCache *MemoryCache) GetService(serviceName string) (*servicediscovery.Service, error)
func (*MemoryCache) Stop ¶ added in v1.6.7
func (memoryCache *MemoryCache) Stop()
type Registrar ¶
type Registrar struct {
// contains filtered or unexported fields
}
func (*Registrar) GetAllInstances ¶
func (registrar *Registrar) GetAllInstances(serviceName string) []servicediscovery.ServiceInstance
func (*Registrar) GetAllServices ¶ added in v1.6.6
func (registrar *Registrar) GetAllServices() ([]*servicediscovery.Service, error)
func (*Registrar) GetHealthyInstances ¶
func (registrar *Registrar) GetHealthyInstances(serviceName string) []servicediscovery.ServiceInstance
func (*Registrar) Unregister ¶
func (*Registrar) Watch ¶ added in v1.6.6
func (registrar *Registrar) Watch(opts ...servicediscovery.WatchOption) (servicediscovery.Watcher, error)
type Watcher ¶ added in v1.6.6
type Watcher struct { Res chan *servicediscovery.Result // contains filtered or unexported fields }
func NewWatcher ¶ added in v1.6.6
func NewWatcher() *Watcher
Click to show internal directories.
Click to hide internal directories.