Versions in this module Expand all Collapse all v0 v0.2.2 May 2, 2020 v0.2.1 Nov 19, 2019 Changes in this version + var ErrClientQuit = errors.New("client is closed") + var ErrNoResult = errors.New("no result in JSON-RPC response") + var ErrSubscriptionQueueOverflow = errors.New("subscription queue overflow") + type Client struct + func Dial(rawurl string) (*Client, error) + func DialContext(ctx context.Context, rawurl string) (*Client, error) + func DialHTTP(endpoint string) (*Client, error) + func DialHTTPWithClient(endpoint string, client *http.Client) (*Client, error) + func DialWebsocket(ctx context.Context, endpoint, origin string) (*Client, error) + func (c *Client) Call(result interface{}, method string, args ...interface{}) error + func (c *Client) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error + func (c *Client) Close() + func (c *Client) Subscribe(ctx context.Context, namespace string, channel interface{}, ...) (*ClientSubscription, error) + func (c *Client) SupportedModules() (map[string]string, error) + type ClientSubscription struct + func (sub *ClientSubscription) Err() <-chan error + func (sub *ClientSubscription) Unsubscribe() + type RpcConnPool struct + func NewRpcConnPool(lifetime int) *RpcConnPool + func (p *RpcConnPool) FetchRpcConn(rpcAddr string) *RpcConnection + type RpcConnection struct + Client *Client + func (c *RpcConnection) Release()