Documentation ¶
Overview ¶
Package jsonclient 实现JSON rpc客户端请求功能
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶
type Callback func(res interface{}) (interface{}, error)
Callback a callback function
type JSONClient ¶
type JSONClient struct {
// contains filtered or unexported fields
}
JSONClient a object of jsonclient
func New ¶
func New(prefix, url string, tlsVerify bool) (*JSONClient, error)
New produce a jsonclient by perfix and url
func NewJSONClient ¶
func NewJSONClient(url string) (*JSONClient, error)
NewJSONClient produce a json object
func (*JSONClient) Call ¶
func (client *JSONClient) Call(method string, params, resp interface{}) error
Call jsonclinet call method
type RPCCtx ¶
type RPCCtx struct { Addr string Method string Params interface{} Res interface{} // contains filtered or unexported fields }
RPCCtx rpc ctx interface TODO: SetPostRunCb()
func (*RPCCtx) RunWithoutMarshal ¶
func (c *RPCCtx) RunWithoutMarshal()
RunWithoutMarshal return source result of string
Click to show internal directories.
Click to hide internal directories.