delivery

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrComm = errors.New("communication issue")
)

Functions

func New

func New(
	sp view2.ServiceProvider,
	network Network,
	callback Callback,
	vault Vault,
	waitForEventTimeout time.Duration,
) (*delivery, error)

Types

type Callback

type Callback func(block *types.AugmentedBlockHeader) (bool, error)

type DeliverStream

type DeliverStream interface {
	// Receive returns
	//    - *types.BlockHeader if IncludeTxIDs is set to false in the delivery config
	//    - *types.AugmentedBlockHeader if IncludeTxIDs is set to true in the delivery config
	//    - nil if service has been stopped either by the caller or due to an error
	Receive() interface{}
	// Stop stops the delivery service
	Stop()
	// Error returns any accumulated error
	Error() error
}

type Network

type Network interface {
	SessionManager() driver.SessionManager
	IdentityManager() driver.IdentityManager
	Name() string
}

type Vault

type Vault interface {
	// GetLastTxID returns the last transaction id committed
	GetLastTxID() (string, error)
}

Vault models a key-value store that can be updated by committing rwsets

Jump to

Keyboard shortcuts

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