Documentation ¶
Index ¶
Constants ¶
View Source
const ( InternalServerError = -32603 ParseError = -32700 InvalidRequest = -32600 RequestTimeout = 3 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func CreateRPCError ¶
func CreateRPCError(isBatch bool, reqRPCBody RPCRequest, reqRPCBodies []RPCRequest, code int, message string) interface{}
CreateRPCError returns rpc errors for appropriate request ids
Types ¶
type RPCRequest ¶
type RPCResponse ¶
type RPCResponse struct { JSONRPC string `json:"jsonrpc"` ID uint64 `json:"id"` Result *json.RawMessage `json:"result,omitempty"` Error *RPCError `json:"error,omitempty"` }
func CheckBatchRPCResponse ¶
func CheckBatchRPCResponse(body []byte) ([]RPCResponse, error)
CheckBatchRPCResponse checks for errors in batch rpc response
func CheckSingleRPCResponse ¶
func CheckSingleRPCResponse(body []byte) (RPCResponse, error)
CheckSingleRPCResponse checks for errors in non batch rpc response
Click to show internal directories.
Click to hide internal directories.