ingest

package
v0.0.0-...-0e5ff0a Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockEvent

type BlockEvent interface {
	Number() *big.Int
}

type Connector

type Connector interface {
	Apply(interface{})
	Revert(interface{})
	SetReady()
}

type Engine

type Engine struct {
	Queue     chan BlockEvent
	Connector Connector
	Processor Processor
	RawEngine
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(syncMode string, syncThreadPool int, syncThreadSize int) *Engine

func (*Engine) Init

func (engine *Engine) Init()

func (*Engine) ListenProcess

func (engine *Engine) ListenProcess(number *big.Int)

func (*Engine) SetConnector

func (engine *Engine) SetConnector(connector Connector)

func (*Engine) SetEnd

func (engine *Engine) SetEnd(val string)

func (*Engine) SetProcessor

func (engine *Engine) SetProcessor(processor Processor)

func (*Engine) SetStart

func (engine *Engine) SetStart(val string, plusOne bool)

func (*Engine) Start

func (engine *Engine) Start() *big.Int

func (*Engine) Status

func (engine *Engine) Status() map[string]interface{}

type Processor

type Processor interface {
	NewBlockEvent(*big.Int, string, string) BlockEvent
	Process(interface{}, BlockEvent, bool)
}

type RawEngine

type RawEngine interface {
	Latest() (*big.Int, error)
	Process(number *big.Int, listening bool) BlockEvent
	Listen()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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