client

package
v0.0.0-...-8b25d31 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 11 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNacosDiscovery

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

NewNacosDiscovery returns a new NacosDiscovery.

func NewNacosDiscoveryWithClient

func NewNacosDiscoveryWithClient(servicePath, cluster, group string, namingClient naming_client.INamingClient) client.ServiceDiscovery

Types

type NacosDiscovery

type NacosDiscovery struct {

	// nacos client config
	ClientConfig constant.ClientConfig
	// nacos server config
	ServerConfig []constant.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