indexer

package
v0.0.0-...-ea98088 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

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

Jump to

Keyboard shortcuts

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