Versions in this module Expand all Collapse all v0 v0.0.1 Jun 16, 2023 Changes in this version + const BlockHeaders + const BlockSync + const Filter + const MempoolTransactions + type BlockHeadersChannel struct + Client *centrifuge.Client + Node *centrifuge.Node + func (c *BlockHeadersChannel) ProcessPublish(_ centrifuge.PublishEvent) ([]byte, error) + func (c *BlockHeadersChannel) ProcessSubscribe(_ centrifuge.SubscribeEvent) ([]byte, error) + type BlockSyncChannel struct + Client *centrifuge.Client + Node *centrifuge.Node + Processor chainstate.MonitorProcessor + func (c *BlockSyncChannel) ProcessPublish(e centrifuge.PublishEvent) ([]byte, error) + func (c *BlockSyncChannel) ProcessSubscribe(e centrifuge.SubscribeEvent) ([]byte, error) + type BlockSyncSubscriber struct + Block *node.Block + Channel string + From string + Node *centrifuge.Node + Processor chainstate.MonitorProcessor + Synced bool + To string + Transactions []node.Tx + func (b *BlockSyncSubscriber) GetTransactions() ([]node.Tx, error) + func (b *BlockSyncSubscriber) Publish(data []byte) error + func (b *BlockSyncSubscriber) Subscribe() error + type Channel interface + ProcessPublish func(e centrifuge.PublishEvent) ([]byte, error) + ProcessSubscribe func(e centrifuge.SubscribeEvent) ([]byte, error) + type ConnectedClient struct + ID string + LastSeen int64 + type FilterChannel struct + Client *centrifuge.Client + Node *centrifuge.Node + Processor chainstate.MonitorProcessor + func (c *FilterChannel) ProcessPublish(e centrifuge.PublishEvent) ([]byte, error) + func (c *FilterChannel) ProcessSubscribe(e centrifuge.SubscribeEvent) ([]byte, error) + type MempoolTransactionsChannel struct + Client *centrifuge.Client + Node *centrifuge.Node + func (c *MempoolTransactionsChannel) ProcessPublish(_ centrifuge.PublishEvent) ([]byte, error) + func (c *MempoolTransactionsChannel) ProcessSubscribe(_ centrifuge.SubscribeEvent) ([]byte, error) + type ProcessorNode struct + Node *centrifuge.Node + Processor chainstate.MonitorProcessor + type Server struct + BlockHeadersClient *centrifugeClient.Client + Client *centrifuge.Client + ClientMap map[string]*ConnectedClient + MempoolClient *centrifugeClient.Client + Node *centrifuge.Node + Processor chainstate.MonitorProcessor + func (s *Server) GetChannel(client *centrifuge.Client, channelName string) Channel + func (s *Server) Start(cfg *config.Config) + func (s *Server) StartBlockHeadersListener() error + func (s *Server) StartMempoolListener() error + func (s *Server) StopBlockHeadersListener() error + func (s *Server) StopMempoolListener() error + type Subscriber interface + GetTransactions func() ([]string, error) + Publish func() error + Subscribe func() error