chunker

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: AGPL-3.0 Imports: 4 Imported by: 1

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 transformer.EventTransformerConfig)
	ChunkLogs(logs []core.HeaderSyncLog) map[string][]core.HeaderSyncLog
}

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.7

func (chunker *LogChunker) AddConfig(transformerConfig transformer.EventTransformerConfig)

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

func (*LogChunker) ChunkLogs

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

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