Documentation ¶
Index ¶
- func GetService(s string) *server.ServiceInfo
- func GetServiceKey(prefix string, s *server.ServiceInfo) string
- func GetServiceValue(s *server.ServiceInfo) string
- type Endpoints
- type Nop
- func (n Nop) Close() error
- func (n Nop) ListServices(ctx context.Context, s string, s2 string) ([]*server.ServiceInfo, error)
- func (n Nop) RegisterService(context.Context, *server.ServiceInfo) error
- func (n Nop) UnregisterService(context.Context, *server.ServiceInfo) error
- func (n Nop) WatchServices(ctx context.Context, s string, s2 string) (chan Endpoints, error)
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServiceKey ¶
func GetServiceKey(prefix string, s *server.ServiceInfo) string
GetServiceKey ..
Types ¶
type Endpoints ¶
type Endpoints struct { // 服务节点列表 Nodes map[string]server.ServiceInfo }
Endpoints ...
type Nop ¶
type Nop struct{}
Nop registry, used for local development/debugging
func (Nop) ListServices ¶
ListServices ...
func (Nop) RegisterService ¶
RegisterService ...
func (Nop) UnregisterService ¶
UnregisterService ...
type Registry ¶
type Registry interface { RegisterService(context.Context, *server.ServiceInfo) error UnregisterService(context.Context, *server.ServiceInfo) error ListServices(context.Context, string, string) ([]*server.ServiceInfo, error) WatchServices(context.Context, string, string) (chan Endpoints, error) io.Closer }
Click to show internal directories.
Click to hide internal directories.