client

package
v0.0.0-...-a04e778 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEtcdDiscovery

func NewEtcdDiscovery(basePath string, servicePath string, etcdAddr []string, allowKeyNotFound bool, options *store.Config) (client.ServiceDiscovery, error)

NewEtcdDiscovery returns a new EtcdDiscovery.

func NewEtcdDiscoveryStore

func NewEtcdDiscoveryStore(basePath string, kv store.Store, allowKeyNotFound bool) (client.ServiceDiscovery, error)

NewEtcdDiscoveryStore return a new EtcdDiscovery with specified store.

func NewEtcdDiscoveryTemplate

func NewEtcdDiscoveryTemplate(basePath string, etcdAddr []string, allowKeyNotFound bool, options *store.Config) (client.ServiceDiscovery, error)

NewEtcdDiscoveryTemplate returns a new EtcdDiscovery template.

func NewEtcdV3Discovery

func NewEtcdV3Discovery(basePath string, servicePath string, etcdAddr []string, allowKeyNotFound bool, options *store.Config) (client.ServiceDiscovery, error)

NewEtcdV3Discovery returns a new EtcdV3Discovery.

func NewEtcdV3DiscoveryStore

func NewEtcdV3DiscoveryStore(basePath string, kv store.Store, allowKeyNotFound bool) (client.ServiceDiscovery, error)

NewEtcdV3DiscoveryStore return a new EtcdV3Discovery with specified store.

func NewEtcdV3DiscoveryTemplate

func NewEtcdV3DiscoveryTemplate(basePath string, etcdAddr []string, allowKeyNotFound bool, options *store.Config) (client.ServiceDiscovery, error)

NewEtcdV3DiscoveryTemplate returns a new EtcdV3Discovery template.

Types

type EtcdDiscovery

type EtcdDiscovery struct {

	// -1 means it always retry to watch until zookeeper is ok, 0 means no retry.
	RetriesAfterWatchFailed int

	AllowKeyNotFound bool
	// contains filtered or unexported fields
}

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

func (*EtcdDiscovery) Clone

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

Clone clones this ServiceDiscovery with new servicePath.

func (*EtcdDiscovery) Close

func (d *EtcdDiscovery) Close()

func (*EtcdDiscovery) GetServices

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

GetServices returns the servers

func (*EtcdDiscovery) RemoveWatcher

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

func (*EtcdDiscovery) SetFilter

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

SetFilter sets the filer.

func (*EtcdDiscovery) WatchService

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

WatchService returns a nil chan.

type EtcdV3Discovery

type EtcdV3Discovery struct {

	// -1 means it always retry to watch until zookeeper is ok, 0 means no retry.
	RetriesAfterWatchFailed int

	AllowKeyNotFound bool
	// contains filtered or unexported fields
}

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

func (*EtcdV3Discovery) Clone

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

Clone clones this ServiceDiscovery with new servicePath.

func (*EtcdV3Discovery) Close

func (d *EtcdV3Discovery) Close()

func (*EtcdV3Discovery) GetServices

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

GetServices returns the servers

func (*EtcdV3Discovery) RemoveWatcher

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

func (*EtcdV3Discovery) SetFilter

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

SetFilter sets the filer.

func (*EtcdV3Discovery) WatchService

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