nacos

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNacosV2Discovery

func NewNacosV2Discovery(options map[string]interface{}) (base.Discovery, error)

NewNacosV2Discovery returns a new NacosV2Discovery.

func NewNacosV2Registry

func NewNacosV2Registry(options map[string]interface{}) (base.Registry, error)

Types

type NacosServiceClient

type NacosServiceClient struct {
	naming_client.INamingClient

	NamespaceId string
	Servers     []string // ip+port, like 127.0.0.1:8848
	// contains filtered or unexported fields
}

func NewNacosServiceClient

func NewNacosServiceClient(options map[string]interface{}) (*NacosServiceClient, error)

func (*NacosServiceClient) SelectAllServiceInstances

func (ngsc *NacosServiceClient) SelectAllServiceInstances() []model.Instance

type NacosV2Discovery

type NacosV2Discovery struct {
	// contains filtered or unexported fields
}

NacosV2Discovery is a nacos service discovery. It always returns the registered servers in etcd.

func (*NacosV2Discovery) Close

func (nd *NacosV2Discovery) Close()

func (*NacosV2Discovery) GetServices

func (nd *NacosV2Discovery) GetServices() []*base.ServiceInstance

GetServices returns the servers

func (*NacosV2Discovery) WatchService

func (nd *NacosV2Discovery) WatchService() <-chan []*base.ServiceInstance

WatchService returns a nil chan.

type NacosV2Registry

type NacosV2Registry struct {
	// contains filtered or unexported fields
}

func (*NacosV2Registry) Register

func (ng *NacosV2Registry) Register(ctx context.Context, serviceInstance *base.ServiceInstance) error

func (*NacosV2Registry) Unregister

func (ng *NacosV2Registry) Unregister(ctx context.Context, name string) error

func (*NacosV2Registry) UnregisterAllService

func (ng *NacosV2Registry) UnregisterAllService(ctx context.Context) error

Jump to

Keyboard shortcuts

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