Documentation ¶
Index ¶
- func NewNacosDiscovery(servicePath, cluster, group string, clientConfig constant2.ClientConfig, ...) (client.ServiceDiscovery, error)
- type NacosDiscovery
- func (d *NacosDiscovery) Clone(servicePath string) (client.ServiceDiscovery, error)
- func (d *NacosDiscovery) Close()
- func (d *NacosDiscovery) GetServices() []*client.KVPair
- func (d *NacosDiscovery) RemoveWatcher(ch chan []*client.KVPair)
- func (d *NacosDiscovery) SetFilter(filter client.ServiceDiscoveryFilter)
- func (d *NacosDiscovery) WatchService() chan []*client.KVPair
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.
Click to show internal directories.
Click to hide internal directories.