jsonclient

package
v0.0.0-...-1c4572a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2018 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

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)

type JSONClient

type JSONClient struct {
	// contains filtered or unexported fields
}

func New

func New(prefix, url string) (*JSONClient, error)

func NewJSONClient

func NewJSONClient(url string) (*JSONClient, error)

func (*JSONClient) Call

func (client *JSONClient) Call(method string, params, resp interface{}) error

type RpcCtx

type RpcCtx struct {
	Addr   string
	Method string
	Params interface{}
	Res    interface{}
	// contains filtered or unexported fields
}

TODO: SetPostRunCb()

func NewRpcCtx

func NewRpcCtx(laddr, method string, params, res interface{}) *RpcCtx

func (*RpcCtx) Run

func (c *RpcCtx) Run()

func (*RpcCtx) RunResult

func (c *RpcCtx) RunResult() (interface{}, error)

func (*RpcCtx) RunWithoutMarshal

func (c *RpcCtx) RunWithoutMarshal()

func (*RpcCtx) SetResultCb

func (c *RpcCtx) SetResultCb(cb Callback)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL