provider

package
v0.26.14-test-synchron... Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: AGPL-3.0 Imports: 17 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

An Engine provides means of accessing data about execution state and broadcasts execution receipts to nodes in the network. Also generates and saves execution receipts

func New

func New(
	logger zerolog.Logger,
	tracer module.Tracer,
	net network.Network,
	state protocol.State,
	me module.Local,
	execState state.ReadOnlyExecutionState,
	metrics module.ExecutionMetrics,
	checkAuthorizedAtBlock func(blockID flow.Identifier) (bool, error),
	chdpQueryTimeout uint,
	chdpDeliveryTimeout uint,
) (*Engine, error)

func (*Engine) BroadcastExecutionReceipt

func (e *Engine) BroadcastExecutionReceipt(ctx context.Context, receipt *flow.ExecutionReceipt) error

func (*Engine) Done

func (e *Engine) Done() <-chan struct{}

Done returns a channel that will close when the engine has successfully stopped.

func (*Engine) Process

func (e *Engine) Process(channel network.Channel, originID flow.Identifier, event interface{}) error

func (*Engine) ProcessLocal

func (e *Engine) ProcessLocal(event interface{}) error

func (*Engine) Ready

func (e *Engine) Ready() <-chan struct{}

Ready returns a channel that will close when the engine has successfully started.

func (*Engine) Submit

func (e *Engine) Submit(channel network.Channel, originID flow.Identifier, event interface{})

func (*Engine) SubmitLocal

func (e *Engine) SubmitLocal(event interface{})

type ProviderEngine

type ProviderEngine interface {
	network.Engine
	BroadcastExecutionReceipt(context.Context, *flow.ExecutionReceipt) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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