client

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNacosDiscovery

func NewNacosDiscovery(servicePath, cluster, group string, clientConfig constant2.ClientConfig, serverConfig []constant2.ServerConfig) (client.ServiceDiscovery, error)

NewNacosDiscovery returns a new NacosDiscovery.

Types

type NacosDiscovery

type NacosDiscovery struct {

	// nacos client config
	ClientConfig constant2.ClientConfig
	// nacos server config
	ServerConfig []constant2.ServerConfig
	Cluster      string
	Group        string

	RetriesAfterWatchFailed int
	// contains filtered or unexported fields
}

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

func (*NacosDiscovery) Clone

func (d *NacosDiscovery) Clone(servicePath string) (client.ServiceDiscovery, error)

Clone clones this ServiceDiscovery with new servicePath.

func (*NacosDiscovery) Close

func (d *NacosDiscovery) Close()

func (*NacosDiscovery) GetServices

func (d *NacosDiscovery) GetServices() []*client.KVPair

GetServices returns the servers

func (*NacosDiscovery) RemoveWatcher

func (d *NacosDiscovery) RemoveWatcher(ch chan []*client.KVPair)

func (*NacosDiscovery) SetFilter

func (d *NacosDiscovery) SetFilter(filter client.ServiceDiscoveryFilter)

SetFilter sets the filer.

func (*NacosDiscovery) WatchService

func (d *NacosDiscovery) WatchService() chan []*client.KVPair

WatchService returns a nil chan.

Jump to

Keyboard shortcuts

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