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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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