orchestration

package
v0.0.0-...-34de315 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExist    = errors.New("block assembly already exists")
	ErrNotExist = errors.New("block assembly does not exist")
)

Errors exported by the package.

Functions

This section is empty.

Types

type Assembly

type Assembly interface {
	Validate(hash types.Hash) error
}

Assembly represents an interface to the block assembler.

type Download

type Download interface {
	HasInv(hash types.Hash) bool
	HasTx(hash types.Hash) bool
	StartInv(hash types.Hash) error
	StartTx(hash types.Hash) error
	CancelInv(hash types.Hash) error
	CancelTx(hash types.Hash) error
}

Download represents an interface to the block inventories storage.

type Inventories

type Inventories interface {
	Get(hash types.Hash) (*types.Inventory, error)
}

Inventories represents an interface to the block inventories storage.

type Manager

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

Manager organizes the block downloads.

func (*Manager) Collect

func (om *Manager) Collect(hash types.Hash) error

Collect starts collecting all entities required to assemble a block.

func (*Manager) Inventory

func (om *Manager) Inventory(hash types.Hash) error

Inventory notifies the block assembler that an inventory was received.

func (*Manager) Suspend

func (om *Manager) Suspend(hash types.Hash) error

Suspend suspends the assembly of the block with the given hash.

func (*Manager) Transaction

func (om *Manager) Transaction(hash types.Hash) error

Transaction notifies the block downloader when a transaction is received.

type Transactions

type Transactions interface {
	Has(hash types.Hash) bool
}

Transactions is an interface to the transaction storage.

Jump to

Keyboard shortcuts

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