Versions in this module Expand all Collapse all v1 v1.0.0 Nov 19, 2018 Changes in this version + const InternalErr + const InvalidParamErr + const InvalidRequest + const JSONRPCVER + const MaxMultiRequest + const MethodNotFound + const ParseErr + const ServerErr + type Client struct + func NewClient() *Client + func (c *Client) Call(id, method string, args, reply interface{}) error + func (c *Client) CallMulti(method string, params, replys interface{}) error + func (c *Client) DialTCP(addr string) + type JsonrpcErr struct + Code int + Data interface{} + Message string + func NewJsonrpcErr(code int, message string, data interface{}) *JsonrpcErr + func (j *JsonrpcErr) Error() string + type Request struct + ID string + Jsonrpc string + Method string + Params interface{} + func NewRequest(id string, params interface{}, method string) *Request + type Response struct + Error *JsonrpcErr + ID string + Jsonrpc string + Result interface{} + func NewResponse(id string, result interface{}, err *JsonrpcErr) *Response + type Server struct + func NewServer() *Server + func (s *Server) HandleTCP(addr string) + func (s *Server) Register(rcvr interface{}) error + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)