Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery interface { // 注册服务 Register(*ServiceDesc) error // 解注册服务 Deregister(svcid string) error // 根据服务名查到可用的服务 Query(name string) (ret []*ServiceDesc, err error) // 注册服务变化通知 RegisterNotify(mode string) (ret chan struct{}) // 解除服务变化通知 DeregisterNotify(mode string, c chan struct{}) // https://www.consul.io/intro/getting-started/kv.html // 设置值 SetValue(key string, value []byte) error // 获取值 GetValue(key string) ([]byte, bool, error) }
var (
Default Discovery
)
type ServiceDesc ¶
func (*ServiceDesc) Address ¶
func (self *ServiceDesc) Address() string
func (*ServiceDesc) String ¶
func (self *ServiceDesc) String() string
Click to show internal directories.
Click to hide internal directories.