executor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockExecutor

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

BlockExecutor executes block from order

func New

func New(chainLedger ledger.Ledger, logger logrus.FieldLogger) (*BlockExecutor, error)

New creates executor instance

func (*BlockExecutor) ExecuteBlock

func (exec *BlockExecutor) ExecuteBlock(block *pb.Block)

ExecuteBlock executes block from order

func (*BlockExecutor) Start

func (exec *BlockExecutor) Start() error

Start starts executor

func (*BlockExecutor) Stop

func (exec *BlockExecutor) Stop() error

Stop stops executor

func (*BlockExecutor) SubscribeBlockEvent

func (exec *BlockExecutor) SubscribeBlockEvent(ch chan<- events.NewBlockEvent) event.Subscription

SubscribeBlockEvent registers a subscription of NewBlockEvent.

func (*BlockExecutor) SyncExecuteBlock

func (exec *BlockExecutor) SyncExecuteBlock(block *pb.Block)

type Executor

type Executor interface {
	// Start
	Start() error

	// Stop
	Stop() error

	// ExecutorBlock
	ExecuteBlock(*pb.Block)

	// SubscribeBlockEvent
	SubscribeBlockEvent(chan<- events.NewBlockEvent) event.Subscription
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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