Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleKeepAliveResp ¶
func HandleKeepAliveResp(ch <-chan *clientv3.LeaseKeepAliveResponse)
func UserDiscovery ¶
func UserRegisty ¶
func UserRegisty(srv *UserService)
Types ¶
type EtcdDiscovery ¶
type EtcdDiscovery struct {
// contains filtered or unexported fields
}
func NewEtcdDiscovery ¶
func NewEtcdDiscovery(endpoints []string) (*EtcdDiscovery, error)
func (*EtcdDiscovery) GetServiceAddr ¶
func (d *EtcdDiscovery) GetServiceAddr(serviceName string) (string, error)
func (*EtcdDiscovery) WatchService ¶
func (d *EtcdDiscovery) WatchService(serviceName string) error
type EtcdRegisty ¶
type EtcdRegisty struct {
// contains filtered or unexported fields
}
基于etcd服务发现中间件,实现regisrty
func NewEtcdRegisty ¶
func NewEtcdRegisty(endpoints []string, opts ...Option) (*EtcdRegisty, error)
func (*EtcdRegisty) DeRegisty ¶
func (r *EtcdRegisty) DeRegisty() error
func (*EtcdRegisty) Registy ¶
func (r *EtcdRegisty) Registy(srv Service) error
type UserService ¶
func NewUserService ¶
func NewUserService(addr string) *UserService
func (UserService) Addr ¶
func (s UserService) Addr() string
func (UserService) Name ¶
func (s UserService) Name() string
Click to show internal directories.
Click to hide internal directories.