registry

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotInitRegisterInstance = errors.New("registry instance not assigned")
	ErrUnknownRegisterInfo     = errors.New("register info unknown")
)

Functions

func Deregister

func Deregister(ctx context.Context, service *registry.ServiceInstance) error

Deregister the registration.

func GetService

func GetService(ctx context.Context, serviceName string) ([]*registry.ServiceInstance, error)

GetService return the service instances in memory according to the service name.

func Register

func Register(ctx context.Context, service *registry.ServiceInstance) error

Register the registration.

func Watch

func Watch(ctx context.Context, serviceName string) (registry.Watcher, error)

Watch creates a watcher according to the service name.

Types

type RegisterDiscover

type RegisterDiscover interface {
	registry.Registrar
	registry.Discovery
}

func GetRegisterDiscover

func GetRegisterDiscover() (RegisterDiscover, error)

func NewRegistry

func NewRegistry(regCfg *registryv1.Registry) (RegisterDiscover, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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