Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventListener ¶
type Registry ¶
type Registry interface {
//注册服务
Register(addr *Address) error
//取消注册
UnRegister(addr *Address) error
//查询服务地址
Lookup() ([]string, error)
//订阅
Subscribe(EventListener) error
//取消订阅
UnSubscribe(EventListener) error
Stop()
}
Registry Extension - Registry
type Service ¶
type Service struct {
EventType uint32 // EventType: 0 => PUT, 1 => DELETE
IP string
Port uint64
Name string
}
订阅获取到的服务信息
type ServiceEvent ¶
type ServiceEvent struct {
Action EventType
// contains filtered or unexported fields
}
ServiceEvent includes create, update, delete event
Click to show internal directories.
Click to hide internal directories.