registry

package
v2.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetService

func GetService(s string) *server.ServiceInfo

GetService ..

func GetServiceKey

func GetServiceKey(prefix string, s *server.ServiceInfo) string

GetServiceKey ..

func GetServiceValue

func GetServiceValue(s *server.ServiceInfo) string

GetServiceValue ..

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) Close

func (n Nop) Close() error

Close ...

func (Nop) ListServices

func (n Nop) ListServices(ctx context.Context, s string, s2 string) ([]*server.ServiceInfo, error)

ListServices ...

func (Nop) RegisterService

func (n Nop) RegisterService(context.Context, *server.ServiceInfo) error

RegisterService ...

func (Nop) UnregisterService

func (n Nop) UnregisterService(context.Context, *server.ServiceInfo) error

UnregisterService ...

func (Nop) WatchServices

func (n Nop) WatchServices(ctx context.Context, s string, s2 string) (chan Endpoints, error)

WatchServices ...

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL