chunker

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 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 {
	AddConfigs(transformerConfigs []shared_t.EventTransformerConfig)
	ChunkLogs(logs []types.Log) map[string][]types.Log
}

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) AddConfigs

func (chunker *LogChunker) AddConfigs(transformerConfigs []shared_t.EventTransformerConfig)

Configures the chunker by adding more addreses and topics to consider.

func (*LogChunker) ChunkLogs

func (chunker *LogChunker) ChunkLogs(logs []types.Log) map[string][]types.Log

Goes through an array 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