discovery

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

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 New

func New(auth *util.ETCDAuth) *ServiceDiscovery

New 新增服務發現實例

func (*ServiceDiscovery) Close

func (s *ServiceDiscovery) Close() error

Close 关闭服务

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 初始化服务列表和监视

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL