Documentation ¶
Overview ¶
Package zmq reference is taken from https://github.com/joakimofv/go-bitcoindclient which is a go wrapper around official zmq package https://github.com/pebbe/zmq4
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client that provides methods for interacting with zmq4. Must be created with New and destroyed with Close. Clients are safe for concurrent use by multiple goroutines.
func New ¶
func New(zmqEndpoint string, blockEventChan chan *types.BlockEvent, rpcClient *rpcclient.Client) (*Client, error)
New returns an initiated client, or an error.
func (*Client) SubscribeSequence ¶
SubscribeSequence subscribes to the ZMQ "sequence" messages as SequenceMsg items pushed onto the channel. Call cancel to cancel the subscription and let the client release the resources. The channel is closed when the subscription is canceled or when the client is closed.
type SequenceMsg ¶
type SequenceMsg struct { Hash [32]byte // use encoding/hex.EncodeToString() to get it into the RPC method string format. Event types.EventType }
SequenceMsg is a subscription event coming from a "sequence" ZMQ message.