Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Processors = make(map[string]ProcessorConstructor)
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 ProcessorBuilderByName ¶
func ProcessorBuilderByName(name string) (ProcessorConstructor, error)
ProcessorBuilderByName returns a Processor constructor for the name provided
type ProcessorConstructorFunc ¶
type ProcessorConstructorFunc func() Processor
ProcessorConstructorFunc is Constructor implementation for processors
func (ProcessorConstructorFunc) New ¶
func (f ProcessorConstructorFunc) New() Processor
New initializes a processor constructor