chunker

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunker

type Chunker interface {
	AddConfig(transformerConfig event.TransformerConfig)
	ChunkLogs(logs []core.EventLog) map[string][]core.EventLog
}

type LogChunker

type LogChunker struct {
	AddressToNames map[string][]string
	NameToTopic0   map[string]common.Hash
}

func NewLogChunker

func NewLogChunker() *LogChunker

Returns a new log chunker with initialised maps. Needs to have configs added with `AddConfigs` to consider logs for the respective transformer.

func (*LogChunker) AddConfig added in v0.0.10

func (chunker *LogChunker) AddConfig(transformerConfig event.TransformerConfig)

Configures the chunker by adding one config with more addresses and topics to consider.

func (*LogChunker) ChunkLogs

func (chunker *LogChunker) ChunkLogs(logs []core.EventLog) map[string][]core.EventLog

Goes through a slice of logs, associating relevant logs (matching addresses and topic) with transformers

Jump to

Keyboard shortcuts

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