Documentation ¶
Index ¶
- type Client
- func (c *Client) Call(res interface{}, method string, params ...interface{}) error
- func (c *Client) CallRequest(res interface{}, req *Request) error
- func (c *Client) Close() error
- func (c *Client) SendRawRequest(req *Request) (*Message, error)
- func (c *Client) Subscribe(id string) (chan *Message, error)
- func (c *Client) Unsubscribe(id string) error
- type Connection
- type Error
- type Message
- type Request
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func DiscoverAndDial ¶
func (*Client) CallRequest ¶
func (*Client) Unsubscribe ¶
type Connection ¶
func DialHttpConnection ¶
func DialHttpConnection(addr string) (Connection, error)
func DialWebsocketConnection ¶
func DialWebsocketConnection(host string) (Connection, error)
type Error ¶
type Error struct { Code int `json:"code"` Message string `json:"message"` Data json.RawMessage `json:"data,omitempty"` }
type Message ¶
type Message struct { ID int64 `json:"id,omitempty"` Version string `json:"jsonrpc"` Method string `json:"method,omitempty"` Params json.RawMessage `json:"params,omitempty"` Result json.RawMessage `json:"result,omitempty"` Error *Error `json:"error,omitempty"` }
Click to show internal directories.
Click to hide internal directories.