Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { CallRPC(ctx context.Context, result interface{}, method string, params ...interface{}) error SyncRequest(ctx context.Context, rpcReq *RPCRequest) (rpcRes *RPCResponse, err error) }
Backend performs communication with a backend
type RPCRequest ¶
type RPCResponse ¶
type RPCResponse struct { JSONRpc string `json:"jsonrpc"` ID *fftypes.JSONAny `json:"id"` Result *fftypes.JSONAny `json:"result,omitempty"` Error *RPCError `json:"error,omitempty"` }
func RPCErrorResponse ¶
func RPCErrorResponse(err error, id *fftypes.JSONAny, code RPCCode) *RPCResponse
func (*RPCResponse) Message ¶
func (r *RPCResponse) Message() string
Click to show internal directories.
Click to hide internal directories.