Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAlreadyRegitered = errors.New("same service name is already registered") ErrClose = errors.New("register is close") )
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
Get(service string) ([]*ServiceNode, bool)
Set(service string, nodes []*ServiceNode)
Del(service string)
}
type RCache ¶
func (*RCache) GetAll ¶
func (c *RCache) GetAll() map[string][]*ServiceNode
func (*RCache) Set ¶
func (c *RCache) Set(service string, nodes []*ServiceNode)
type Register ¶
type Register interface {
Register(Node *ServiceNode, opt *Options) error
Deregister(Node *ServiceNode) error
GetService(service string) ([]*ServiceNode, error)
Close()
}
Click to show internal directories.
Click to hide internal directories.