Versions in this module Expand all Collapse all v0 v0.32.0 Sep 13, 2023 Changes in this version + const URIClientRequestID + func DefaultHTTPClient(remoteAddr string) (*http.Client, error) + func MaxReconnectAttempts(max int) func(*WSClient) + func OnReconnect(cb func()) func(*WSClient) + func PingPeriod(pingPeriod time.Duration) func(*WSClient) + func ReadWait(readWait time.Duration) func(*WSClient) + func WriteWait(writeWait time.Duration) func(*WSClient) + type Caller interface + Call func(method string, params map[string]interface{}, result interface{}) (interface{}, error) + type Client struct + func New(remote string) (*Client, error) + func NewWithHTTPClient(remote string, client *http.Client) (*Client, error) + func (c *Client) Call(method string, params map[string]interface{}, result interface{}) (interface{}, error) + func (c *Client) Codec() *amino.Codec + func (c *Client) NewRequestBatch() *RequestBatch + func (c *Client) SetCodec(cdc *amino.Codec) + type HTTPClient interface + Call func(method string, params map[string]interface{}, result interface{}) (interface{}, error) + Codec func() *amino.Codec + SetCodec func(*amino.Codec) + type RequestBatch struct + func (b *RequestBatch) Call(method string, params map[string]interface{}, result interface{}) (interface{}, error) + func (b *RequestBatch) Clear() int + func (b *RequestBatch) Count() int + func (b *RequestBatch) Send() ([]interface{}, error) + type URIClient struct + func NewURI(remote string) (*URIClient, error) + func (c *URIClient) Call(method string, params map[string]interface{}, result interface{}) (interface{}, error) + func (c *URIClient) Codec() *amino.Codec + func (c *URIClient) SetCodec(cdc *amino.Codec) + type WSClient struct + Address string + Dialer func(string, string) (net.Conn, error) + Endpoint string + PingPongLatencyTimer metrics.Timer + ResponsesCh chan types.RPCResponse + func NewWS(remoteAddr, endpoint string, options ...func(*WSClient)) (*WSClient, error) + func (c *WSClient) Call(ctx context.Context, method string, params map[string]interface{}) error + func (c *WSClient) CallWithArrayParams(ctx context.Context, method string, params []interface{}) error + func (c *WSClient) Codec() *amino.Codec + func (c *WSClient) IsActive() bool + func (c *WSClient) IsReconnecting() bool + func (c *WSClient) OnStart() error + func (c *WSClient) Send(ctx context.Context, request types.RPCRequest) error + func (c *WSClient) SetCodec(cdc *amino.Codec) + func (c *WSClient) Stop() error + func (c *WSClient) String() string + func (c *WSClient) Subscribe(ctx context.Context, query string) error + func (c *WSClient) Unsubscribe(ctx context.Context, query string) error + func (c *WSClient) UnsubscribeAll(ctx context.Context) error