Versions in this module Expand all Collapse all v8 v8.0.2 Jun 27, 2022 v8.0.1 Jun 27, 2022 Changes in this version + const DefaultReadTimeout + const DefaultWriteTimeout + func DecodeMsg(msg *pstypes.WebSocketMessage) (interface{}, error) + func DecodeMsgInt(msg *pstypes.WebSocketMessage) (int, error) + func DecodeMsgMempool(msg *pstypes.WebSocketMessage) (*exptypes.MempoolShort, error) + func DecodeMsgNewAddressTx(msg *pstypes.WebSocketMessage) (*pstypes.AddressMessage, error) + func DecodeMsgNewBlock(msg *pstypes.WebSocketMessage) (*exptypes.WebsocketBlock, error) + func DecodeMsgPing(msg *pstypes.WebSocketMessage) (int, error) + func DecodeMsgString(msg *pstypes.WebSocketMessage) (string, error) + func DecodeMsgTxList(msg *pstypes.WebSocketMessage) (*pstypes.TxList, error) + func DecodeResponseMsg(msg *pstypes.WebSocketMessage) (*pstypes.ResponseMessage, error) + func DisableLog() + func UseLogger(logger slog.Logger) + func Version() semver.Semver + type Client struct + func New(url string, ctx context.Context, opts *Opts) (*Client, error) + func NewFromConn(ws *websocket.Conn, ctx context.Context, opts *Opts) *Client + func (c *Client) Ping() error + func (c *Client) Receive() <-chan *ClientMessage + func (c *Client) ServerVersion() (*pstypes.Ver, error) + func (c *Client) Stop() + func (c *Client) Subscribe(event string) (*pstypes.ResponseMessage, error) + func (c *Client) Unsubscribe(event string) (*pstypes.ResponseMessage, error) + type ClientMessage struct + EventId string + Message interface{} + type Opts struct + ReadTimeout time.Duration + WriteTimeout time.Duration Other modules containing this package github.com/Decred-Next/dcrndata/pubsub/v8