notification

package
v2.1.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2018 License: ISC Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NtfnChans struct {
	ConnectChan                       chan *chainhash.Hash
	ReorgChanBlockData                chan *blockdata.ReorgData
	ConnectChanWiredDB                chan *chainhash.Hash
	ReorgChanWiredDB                  chan *dcrsqlite.ReorgData
	ConnectChanStakeDB                chan *chainhash.Hash
	ReorgChanStakeDB                  chan *stakedb.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 CloseNtfnChans

func CloseNtfnChans()

CloseNtfnChans close all notification channels

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(monitorMempool, postgresEnabled bool)

MakeNtfnChans create notification channels based on config

func NewCollectionQueue

func NewCollectionQueue() *collectionQueue

NewCollectionQueue creates a new collectionQueue with a queue channel large enough for 10 million block pointers.

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info.

Types

type ContextualError

type ContextualError struct {
	RootErr error
	Err     error
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL