Documentation ¶
Index ¶
- Variables
- func CloseNtfnChans()
- func DisableLog()
- func MakeNodeNtfnHandlers() (*rpcclient.NotificationHandlers, *collectionQueue)
- func MakeNtfnChans(monitorMempool, postgresEnabled bool)
- func NewCollectionQueue() *collectionQueue
- func UseLogger(logger slog.Logger)
- type ContextualError
- type ReorgData
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 *mempool.NewTx ExpNewTxChan chan *explorer.NewMempoolTx 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 pfcd notification handlers.
func MakeNtfnChans ¶
func MakeNtfnChans(monitorMempool, 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(pfcdClient *rpcclient.Client) *ContextualError
RegisterNodeNtfnHandlers registers with pfcd 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