Documentation ¶
Index ¶
- Variables
- func CallService(appName, serviceMethod string, args, reply interface{}) bool
- func InitClient(rpcxClientConfig *RpcxClientConfig)
- func NewEtcdV3Discovery(basePath string, servicePath string, etcdAddr []string, allowKeyNotFound bool, ...) (client.ServiceDiscovery, error)
- func NewEtcdV3DiscoveryStore(basePath string, kv store.Store, allowKeyNotFound bool) (client.ServiceDiscovery, error)
- func NewEtcdV3DiscoveryTemplate(basePath string, etcdAddr []string, allowKeyNotFound bool, ...) (client.ServiceDiscovery, error)
- type EtcdV3Discovery
- func (d *EtcdV3Discovery) Clone(servicePath string) (client.ServiceDiscovery, error)
- func (d *EtcdV3Discovery) Close()
- func (d *EtcdV3Discovery) GetServices() []*client.KVPair
- func (d *EtcdV3Discovery) RemoveWatcher(ch chan []*client.KVPair)
- func (d *EtcdV3Discovery) SetFilter(filter client.ServiceDiscoveryFilter)
- func (d *EtcdV3Discovery) WatchService() chan []*client.KVPair
- type RpcxClientConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var EtcdClient client.ServiceDiscovery
Functions ¶
func CallService ¶
向微服务发送rpcx请求
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 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.
Click to show internal directories.
Click to hide internal directories.