processors

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

Processors are the constructors to build processor plugins.

Functions

func Register

func Register(name string, constructor ProcessorConstructor)

Register is used to register ProcessorConstructor implementations. This mechanism allows for loose coupling between the configuration and the implementation. It is extremely similar to the way sql.DB drivers are configured and used.

Types

type Processor

type Processor interface {
	// Plugin - implement this interface.
	plugins.Plugin

	// Process will be called with provided optional inputs.
	// It is up to the plugin to check that required inputs are provided.
	Process(input data.BlockData) (data.BlockData, error)
}

Processor an interface that defines an object that can filter and process transactions

type ProcessorConstructor

type ProcessorConstructor interface {
	// New should return an instantiation of a Processor.
	// Configuration values should be passed and can be processed during `Init()`.
	New() Processor
}

ProcessorConstructor must be implemented by each Processor. It provides a basic no-arg constructor for instances of an ProcessorImpl.

func ProcessorConstructorByName added in v1.3.0

func ProcessorConstructorByName(name string) (ProcessorConstructor, error)

ProcessorConstructorByName returns a Processor constructor for the name provided

type ProcessorConstructorFunc

type ProcessorConstructorFunc func() Processor

ProcessorConstructorFunc is Constructor implementation for processors

func (ProcessorConstructorFunc) New

New initializes a processor constructor

Directories

Path Synopsis
Package filterprocessor docs
Package filterprocessor docs
gen

Jump to

Keyboard shortcuts

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