# Functions
Hash consistently chooses a hash bucket number in the range [0, numBuckets) for the given key.
HashString get a hash value of a string.
JumpConsistentHash selects a server by serviceMethod and args.
NewBidirectionalXClient creates a new xclient that can receive notifications from servers.
NewClient returns a new Client with the option.
NewInprocessDiscovery returns a new InprocessDiscovery.
NewPeer2PeerDiscovery returns a new Peer2PeerDiscovery.
NewStaticDiscovery returns a new StaticDiscovery.
NewStaticDiscoveryTemplate returns a new StaticDiscovery template.
NewXClient creates a XClient that supports service discovery and service governance.
# Constants
Closest is selecting the closest server.
ConsistentHash is selecting by hashing.
Failbackup select another server if the first server doesn't respon in specified time and use the fast response.
Failfast returns error immediately.
Failover selects another server automaticaly.
Failtry use current client again.
RandomSelect is selecting randomly.
ReaderBuffsize is used for bufio reader.
RoundRobin is selecting by round robin.
SelectByUser is selecting by implementation of users.
WeightedICMP is selecting by weighted Ping time.
WeightedRoundRobin is selecting by weighted round robin.
WriterBuffsize is used for bufio writer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
DefaultOption is a common option configuration for client.
ErrServerUnavailable selected server is unavailable.
ErrShutdown connection is closed.
ErrShutdown connection is closed.
ErrXClientNoServer selector can't found one server.
ErrXClientShutdown xclient is shutdown.
InprocessClient is a in-process client for test.
# Structs
Call represents an active RPC.
Client represents a RPC client.
InprocessDiscovery is a in-process service discovery.
KVPair contains a key and a string.
Option contains all options for creating clients.
Peer2PeerDiscovery is a peer-to-peer service discovery.
StaticDiscovery is a static service discovery.
Weighted is a wrapped server with weight.
# Interfaces
Breaker is a CircuitBreaker interface.
Plugin is the client plugin interface.
No description provided by the author
No description provided by the author
No description provided by the author
RPCClient is interface that defines one client to call one server.
Selector defines selector that selects one service from candidates.
ServiceDiscovery defines ServiceDiscovery of zookeeper, etcd and consul.
XClient is an interface that used by client with service discovery and service governance.
# Type aliases
ConsistentFunction define a hash function Return service address, like "[email protected]:8970".
FailMode decides how clients action when clients fail to invoke services.
HashServiceAndArgs define a hash function.
SelectMode defines the algorithm of selecting a services from candidates.
ServiceError is an error from server.