Documentation ¶
Index ¶
- type ServiceDiscovery
- func (s *ServiceDiscovery) Close() error
- func (s *ServiceDiscovery) DelServiceList(key string)
- func (s *ServiceDiscovery) GetServiceValue(key string) (*info.ServiceInfo, error)
- func (s *ServiceDiscovery) GetServices() []string
- func (s *ServiceDiscovery) SetServiceList(key, val string)
- func (s *ServiceDiscovery) WatchService(prefix string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServiceDiscovery ¶
type ServiceDiscovery struct {
// contains filtered or unexported fields
}
ServiceDiscovery 服務發現
func (*ServiceDiscovery) DelServiceList ¶
func (s *ServiceDiscovery) DelServiceList(key string)
DelServiceList 删除服务地址
func (*ServiceDiscovery) GetServiceValue ¶
func (s *ServiceDiscovery) GetServiceValue(key string) (*info.ServiceInfo, error)
func (*ServiceDiscovery) GetServices ¶
func (s *ServiceDiscovery) GetServices() []string
GetServices 获取服务地址
func (*ServiceDiscovery) SetServiceList ¶
func (s *ServiceDiscovery) SetServiceList(key, val string)
SetServiceList 新增服务地址
func (*ServiceDiscovery) WatchService ¶
func (s *ServiceDiscovery) WatchService(prefix string) error
WatchService 初始化服务列表和监视
Click to show internal directories.
Click to hide internal directories.