discovery

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 6 Imported by: 0

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 NewServiceDiscovery

func NewServiceDiscovery(endpoints []string) *ServiceDiscovery

NewServiceDiscovery 新建发现服务

func (*ServiceDiscovery) Close

func (s *ServiceDiscovery) Close() error

Close 关闭服务

func (*ServiceDiscovery) DelServiceList

func (s *ServiceDiscovery) DelServiceList(key string)

DelServiceList 删除服务地址

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