Documentation ¶
Index ¶
Constants ¶
View Source
const ( JSON_RPC = "json" JSON_HTTP = "http_jsonrpc" GOB_RPC = "gob" INTERNAL_RPC = "*internal" POOL_FIRST = "first" POOL_RANDOM = "random" POOL_NEXT = "next" POOL_BROADCAST = "broadcast" )
Variables ¶
View Source
var ( ErrReqUnsynchronized = errors.New("REQ_UNSYNCHRONIZED") ErrUnsupporteServiceMethod = errors.New("UNSUPPORTED_SERVICE_METHOD") ErrWrongArgsType = errors.New("WRONG_ARGS_TYPE") ErrWrongReplyType = errors.New("WRONG_REPLY_TYPE") ErrDisconnected = errors.New("DISCONNECTED") ErrReplyTimeout = errors.New("REPLY_TIMEOUT") ErrFailedReconnect = errors.New("FAILED_RECONNECT") ErrInternallyDisconnected = errors.New("INTERNALLY_DISCONNECTED") ErrUnsupportedCodec = errors.New("UNSUPPORTED_CODEC") ErrSessionNotFound = errors.New("SESSION_NOT_FOUND") )
Functions ¶
Types ¶
type HttpJsonRpcClient ¶
type HttpJsonRpcClient struct {
// contains filtered or unexported fields
}
func (*HttpJsonRpcClient) Call ¶
func (self *HttpJsonRpcClient) Call(serviceMethod string, args interface{}, reply interface{}) error
type JsonRpcResponse ¶
type JsonRpcResponse struct { Id uint64 Result *json.RawMessage Error interface{} }
Response received for
type RpcClient ¶
type RpcClient struct {
// contains filtered or unexported fields
}
func NewRpcClient ¶
type RpcClientConnection ¶
Connection used in RpcClient, as interface so we can combine the rpc.RpcClient with http one or websocket
type RpcClientPool ¶
type RpcClientPool struct {
// contains filtered or unexported fields
}
func NewRpcClientPool ¶
func NewRpcClientPool(transmissionType string, replyTimeout time.Duration) *RpcClientPool
func (*RpcClientPool) AddClient ¶
func (pool *RpcClientPool) AddClient(rcc RpcClientConnection)
func (*RpcClientPool) Call ¶
func (pool *RpcClientPool) Call(serviceMethod string, args interface{}, reply interface{}) (err error)
Click to show internal directories.
Click to hide internal directories.