Documentation ¶
Overview ¶
Package jsonrpc2 provides a json-rpc 2.0 codec
Based on powerman/rpc-codec: The MIT License (MIT) Copyright (c) 2015 Alex Efros
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data,omitempty"` }
Error represent JSON-RPC 2.0 "Error object".
func ServerError ¶
ServerError convert errors returned by Client.Call() into Error. User should check for rpc.ErrShutdown and io.ErrUnexpectedEOF before calling ServerError.
Click to show internal directories.
Click to hide internal directories.