Documentation
¶
Index ¶
- func DefaultRoute(session *cherrySession.Session, msg RpcMsg, context RouteContextClass, ...)
- func RandomRoute(client *RPCClient, nodeType string, msg RpcMsg, cb Callback)
- func RoundRobinRoute(client *RPCClient, nodeType string, msg RpcMsg, cb Callback)
- func WeightRoundRoute(client *RPCClient, nodeType string, msg RpcMsg, cb Callback)
- type Callback
- type RPCClient
- type RPCClientOpts
- type RouteContext
- type RouteContextClass
- type RouteNodes
- type RpcMsg
- type RpcNodeInfo
- type TargetRouteFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultRoute ¶
func DefaultRoute(session *cherrySession.Session, msg RpcMsg, context RouteContextClass, cb Callback)
DefaultRoute Calculate route info and return an appropriate node id.
func RandomRoute ¶
RandomRoute Random algorithm for calculating node id.
func RoundRobinRoute ¶
Types ¶
type RPCClientOpts ¶
type RPCClientOpts struct {
}
type RouteContext ¶
type RouteContext struct {
}
type RouteContextClass ¶
type RouteContextClass interface {
GetNodesByType(nodeType string) RouteNodes
}
type RouteNodes ¶
type RouteNodes []RpcNodeInfo
type RpcNodeInfo ¶
type TargetRouteFunction ¶
Click to show internal directories.
Click to hide internal directories.