client

package
v0.0.0-...-d205316 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZookeeperDiscovery

type ZookeeperDiscovery struct {

	// -1 means it always retry to watch until zookeeper is ok, 0 means no retry.
	RetriesAfterWatchFailed int
	// contains filtered or unexported fields
}

ZookeeperDiscovery is a zoopkeer service discovery. It always returns the registered servers in zookeeper.

func NewZookeeperDiscovery

func NewZookeeperDiscovery(basePath string, servicePath string, zkAddr []string, options *store.Config) (*ZookeeperDiscovery, error)

NewZookeeperDiscovery returns a new ZookeeperDiscovery.

func NewZookeeperDiscoveryTemplate

func NewZookeeperDiscoveryTemplate(basePath string, zkAddr []string, options *store.Config) (*ZookeeperDiscovery, error)

NewZookeeperDiscoveryTemplate returns a new ZookeeperDiscovery template.

func NewZookeeperDiscoveryWithStore

func NewZookeeperDiscoveryWithStore(basePath string, kv store.Store) (*ZookeeperDiscovery, error)

NewZookeeperDiscoveryWithStore returns a new ZookeeperDiscovery with specified store.

func (*ZookeeperDiscovery) Clone

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

Clone clones this ServiceDiscovery with new servicePath.

func (*ZookeeperDiscovery) Close

func (d *ZookeeperDiscovery) Close()

func (*ZookeeperDiscovery) GetServices

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

GetServices returns the servers

func (*ZookeeperDiscovery) RemoveWatcher

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

func (*ZookeeperDiscovery) SetFilter

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

SetFilter sets the filer.

func (*ZookeeperDiscovery) WatchService

func (d *ZookeeperDiscovery) 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