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 ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages ZMQ subscriptions and communication with a Bitcoin node. It handles ZMQ message routing and provides thread-safe access to subscriptions. Must be created with New() and cleaned up with Close().
func New ¶
func New( parentLogger zerolog.Logger, zeromqEndpoint string, blockEventsChannel chan *btctypes.BlockEvent, rpcClient *rpcclient.Client, ) (*Client, error)
New creates a new zmq client
func (*Client) SubscribeSequence ¶
SubscribeSequence subscribes to ZMQ "sequence" messages. Call cancel to unsubscribe.
type SequenceMessage ¶
type SequenceMessage struct { Hash [32]byte // use encoding/hex.EncodeToString() to get it into the RPC method string format. Event btctypes.EventType }
SequenceMessage denotes the message struct received from zmq
type Subscriptions ¶
Subscriptions keeps track of the zmq connection state
Click to show internal directories.
Click to hide internal directories.