package
1.0.0
Repository: https://github.com/sixiaobai/rpcxmirror.git
Documentation: pkg.go.dev

# Functions

FailModeString retrieves an enum value from the enum constants string name.
FailModeValues returns all values of the enum.
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.
NewBidirectionalOneClient creates a new xclient that can receive notifications from servers.
NewBidirectionalOneClientPool creates a BidirectionalOneClient pool with fixed size.
NewBidirectionalXClient creates a new xclient that can receive notifications from servers.
NewBidirectionalXClientPool creates a BidirectionalXClient pool with fixed size.
NewClient returns a new Client with the option.
NewConsecCircuitBreaker returns a new ConsecCircuitBreaker.
NewInprocessDiscovery returns a new InprocessDiscovery.
NewMDNSDiscovery returns a new MDNSDiscovery.
NewMDNSDiscoveryTemplate returns a new MDNSDiscovery template.
NewMultipleServersDiscovery returns a new MultipleServersDiscovery.
NewOneClient creates a OneClient that supports service discovery and service governance.
NewOneClientPool creates a fixed size OneClient pool.
NewPeer2PeerDiscovery returns a new Peer2PeerDiscovery.
No description provided by the author
NewXClient creates a XClient that supports service discovery and service governance.
NewXClientPool creates a fixed size XClient pool.
SelectModeString retrieves an enum value from the enum constants string name.
SelectModeValues returns all values of the enum.

# 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.
No description provided by the author
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

CircuitBreaker is a default circuit breaker (RateBreaker(0.95, 100)).
DefaultOption is a common option configuration for client.
No description provided by the author
No description provided by the author
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.
ConsecCircuitBreaker is window sliding CircuitBreaker with failure threshold.
InprocessDiscovery is a in-process service discovery.
KVPair contains a key and a string.
MDNSDiscovery is a mdns service discovery.
MultipleServersDiscovery is a multiple servers service discovery.
OneClient wraps servicesPath and XClients.
OneClientPool is a oneclient pool with fixed size.
No description provided by the author
No description provided by the author
Option contains all options for creating clients.
Peer2PeerDiscovery is a peer-to-peer service discovery.
Weighted is a wrapped server with weight.
XClientPool is a xclient pool with fixed size.

# Interfaces

Breaker is a CircuitBreaker interface.
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
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.