processor

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ProvideTimeout is the timeout when letting the network we provide a resoruce.
	ProvideTimeout = time.Second * 10
)

Functions

This section is empty.

Types

type ContentProvider

type ContentProvider interface {
	Provide(ctx context.Context, key cid.Cid, brdcst bool) error
}

ContentProvider is an interface used to let the network know we provide a resource. The resource is identified by a content ID.

type Processor

type Processor interface {
	// Process applies the state changes from the block contents
	// and adds the block to the chain.
	Process(ctx context.Context, block *pb.Block, state state.State, ch chain.Chain) error
}

Processor is an interface for processing blocks using a given initial state.

func NewProcessor

func NewProcessor(provider ContentProvider) Processor

NewProcessor creates a new processor.

Directories

Path Synopsis
Package mockprocessor is a generated GoMock package.
Package mockprocessor is a generated GoMock package.

Jump to

Keyboard shortcuts

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