Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NtfnChans struct { ConnectChan chan *chainhash.Hash ReorgChanBlockData chan *txhelpers.ReorgData ConnectChanWiredDB chan *chainhash.Hash ReorgChanWiredDB chan *txhelpers.ReorgData ConnectChanStakeDB chan *chainhash.Hash ReorgChanStakeDB chan *txhelpers.ReorgData ConnectChanDcrpgDB chan *chainhash.Hash ReorgChanDcrpgDB chan *txhelpers.ReorgData UpdateStatusNodeHeight chan uint32 UpdateStatusDBHeight chan uint32 SpendTxBlockChan, RecvTxBlockChan chan *txhelpers.BlockWatchedTx RelevantTxMempoolChan chan *dcrutil.Tx NewTxChan chan *dcrjson.TxRawResult InsightNewTxChan chan *insight.NewTx }
NtfnChans collects the chain server notification channels
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
func MakeNodeNtfnHandlers ¶
func MakeNodeNtfnHandlers() (*rpcclient.NotificationHandlers, *collectionQueue)
MakeNodeNtfnHandlers defines the dcrd notification handlers.
func MakeNtfnChans ¶
func MakeNtfnChans(postgresEnabled bool)
MakeNtfnChans create notification channels based on config
func NewCollectionQueue ¶
func NewCollectionQueue() *collectionQueue
NewCollectionQueue creates a new collectionQueue with an unbuffered channel to facilitate synchronous processing. Run (*collectionQueue).ProcessBlocks as a goroutine to begin processing blocks sent to the channel, or call processBlock for each new block.
Types ¶
type ContextualError ¶
ContextualError models an error and its root error and is returned by registerNodeNtfnHandlers
func RegisterNodeNtfnHandlers ¶
func RegisterNodeNtfnHandlers(dcrdClient *rpcclient.Client) *ContextualError
RegisterNodeNtfnHandlers registers with dcrd to receive new block, transaction and winning ticket notifications.
func (*ContextualError) Cause ¶
func (e *ContextualError) Cause() string
Cause returns the root error string
func (*ContextualError) Error ¶
func (e *ContextualError) Error() string