Version: v1.1.1 Latest Latest

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 9 Imported by: 0




This section is empty.


This section is empty.


This section is empty.


type Option

type Option func(o *options)

Option .

func WithCluster

func WithCluster(cluster string) Option

WithCluster .

func WithGroup

func WithGroup(group string) Option

WithGroup .

func WithProfix

func WithProfix(prefix string) Option

WithProfix .

func WithWeight

func WithWeight(weight float64) Option

WithWeight .

type Registry

type Registry struct {
	// contains filtered or unexported fields

Registry .

func New

func New(cli naming_client.INamingClient, opts ...Option) (r *Registry)

New new a nacos registry.

func (*Registry) Deregister

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

Deregister the registration.

func (*Registry) GetService

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

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

func (*Registry) Register

func (r *Registry) Register(ctx context.Context, si *registry.ServiceInstance) error

Register the registration.

func (*Registry) Watch

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

Watch creates a watcher according to the service name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL