Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewIndexer ¶
func NewIndexer(notifier process.SovereignNotifier, cache OutportBlockCache) (process.Indexer, error)
NewIndexer creates an indexer which will internally save received blocks and notify sovereign shards for each finalized block
func NewOutportBlockCache ¶
func NewOutportBlockCache() *outportBlockCache
NewOutportBlockCache creates a new LRU cache able to store *outport.OutportBlock
Types ¶
type DataProcessor ¶
type DataProcessor interface { ProcessPayload(payload []byte, topic string, version uint32) error Close() error IsInterfaceNil() bool }
DataProcessor defines a payload processor for incoming ws data
func NewPayloadProcessor ¶
func NewPayloadProcessor(indexer process.Indexer, marshaller marshal.Marshalizer) (DataProcessor, error)
NewPayloadProcessor creates a new operation handler
type OutportBlockCache ¶
type OutportBlockCache interface { Add(outportBlock *outport.OutportBlock) error Extract(headerHash []byte) (*outport.OutportBlock, error) IsInterfaceNil() bool }
OutportBlockCache defines a simple cache able to store *outport.OutportBlock
Click to show internal directories.
Click to hide internal directories.