{"modulePath":"github.com/parallelcointeam/exploder","version":"v2.1.3+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package notification\n\n## Variables\n\n```go\nvar NtfnChans struct {\n\tConnectChan                       chan *chainhash.Hash\n\tReorgChanBlockData                chan *blockdata.ReorgData\n\tConnectChanWiredDB                chan *chainhash.Hash\n\tReorgChanWiredDB                  chan *dcrsqlite.ReorgData\n\tConnectChanStakeDB                chan *chainhash.Hash\n\tReorgChanStakeDB                  chan *stakedb.ReorgData\n\tUpdateStatusNodeHeight            chan uint32\n\tUpdateStatusDBHeight              chan uint32\n\tSpendTxBlockChan, RecvTxBlockChan chan *txhelpers.BlockWatchedTx\n\tRelevantTxMempoolChan             chan *dcrutil.Tx\n\tNewTxChan                         chan *mempool.NewTx\n\tExpNewTxChan                      chan *explorer.NewMempoolTx\n\tInsightNewTxChan                  chan *insight.NewTx\n}\n```\nNtfnChans collects the chain server notification channels\n\n## Functions\n\n```go\nfunc CloseNtfnChans()\n```\nCloseNtfnChans close all notification channels\n\n```go\nfunc DisableLog()\n```\nDisableLog disables all library log output.  Logging output is disabled by default until UseLogger is called.\n\n```go\nfunc MakeNodeNtfnHandlers() (*rpcclient.NotificationHandlers, *collectionQueue)\n```\nMakeNodeNtfnHandlers defines the dcrd notification handlers\n\n```go\nfunc MakeNtfnChans(monitorMempool, postgresEnabled bool)\n```\nMakeNtfnChans create notification channels based on config\n\n```go\nfunc NewCollectionQueue() *collectionQueue\n```\nNewCollectionQueue creates a new collectionQueue with a queue channel large enough for 10 million block pointers.\n\n```go\nfunc UseLogger(logger slog.Logger)\n```\nUseLogger uses a specified Logger to output package logging info.\n\n## Types\n\n```go\ntype ContextualError struct {\n\tRootErr error\n\tErr     error\n}\n```\nContextualError models an error and its root error and is returned by registerNodeNtfnHandlers\n\n```go\nfunc RegisterNodeNtfnHandlers(dcrdClient *rpcclient.Client) *ContextualError\n```\nRegisterNodeNtfnHandlers registers with dcrd to receive new block, transaction and winning ticket notifications.\n\n```go\nfunc (e *ContextualError) Cause() string\n```\nCause returns the root error string\n\n```go\nfunc (e *ContextualError) Error() string\n```\n\n","path":"github.com/parallelcointeam/exploder/notification","name":"notification","synopsis":"","isRedistributable":true}
