receiver

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlocksOutput     = "blocks"
	RollbackOutput   = "signal"
	RollbackInput    = "state"
	GenesisOutput    = "genesis"
	GenesisDoneInput = "genesis_done"
	StopOutput       = "stop"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	modules.BaseModule
	// contains filtered or unexported fields
}

Module - runs through a chain aiming to catch up the head

		and identifies whether the block fits in sequence or signals of rollback.

	|----------------|
	|                | -- types.BlockData -> BlocksOutput
	|     MODULE     |
	|    Receiver    | -- struct{}        -> RollbackOutput
	|                | <- storage.State   -- RollbackInput
    |----------------|

func NewModule

func NewModule(cfg config.Indexer, api node.Api, ws *http.HTTP, state *storage.State) Module

func (*Module) Close

func (r *Module) Close() error

func (*Module) Level

func (r *Module) Level() (types.Level, []byte)

func (*Module) Start

func (r *Module) Start(ctx context.Context)

type Worker added in v1.13.0

type Worker struct {
	// contains filtered or unexported fields
}

func NewWorker added in v1.13.0

func NewWorker(api node.Api, log zerolog.Logger, blocks chan types.BlockData, capacity int) *Worker

func (*Worker) Capacity added in v1.13.0

func (worker *Worker) Capacity() int

func (*Worker) Do added in v1.13.0

func (worker *Worker) Do(ctx context.Context, level types.Level, appVersion uint64)

func (*Worker) SetLiveMode added in v1.13.0

func (worker *Worker) SetLiveMode(liveMode bool)

Jump to

Keyboard shortcuts

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