future

package
v0.0.0-...-9098a98 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package future defines various futures as the delegates to communicate between rpc server and the node.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	AccountID string
	Account   *ultpb.Account
	// contains filtered or unexported fields
}

Future for node server to query account.

func (*Account) Error

func (d *Account) Error() error

Error always return the first responded error.

func (*Account) Init

func (d *Account) Init()

Every future should call this method to initialize underlying error channel.

func (*Account) Respond

func (d *Account) Respond(err error)

Each future should respond error once and multiple calling with different error on the same future will have no effects.

type Future

type Future interface {
	Error() error
}

type Ledger

type Ledger struct {
	LedgerSeq string
	Ledger    *ultpb.Ledger
	// contains filtered or unexported fields
}

Future for node server to query ledger.

func (*Ledger) Error

func (d *Ledger) Error() error

Error always return the first responded error.

func (*Ledger) Init

func (d *Ledger) Init()

Every future should call this method to initialize underlying error channel.

func (*Ledger) Respond

func (d *Ledger) Respond(err error)

Each future should respond error once and multiple calling with different error on the same future will have no effects.

type Peer

type Peer struct {
	Addr string
	// contains filtered or unexported fields
}

Future for node server to add new discovered peer address to peer manager.

func (*Peer) Error

func (d *Peer) Error() error

Error always return the first responded error.

func (*Peer) Init

func (d *Peer) Init()

Every future should call this method to initialize underlying error channel.

func (*Peer) Respond

func (d *Peer) Respond(err error)

Each future should respond error once and multiple calling with different error on the same future will have no effects.

type Quorum

type Quorum struct {
	QuorumHash string
	Quorum     *ultpb.Quorum
	// contains filtered or unexported fields
}

Future for node server to query quorum.

func (*Quorum) Error

func (d *Quorum) Error() error

Error always return the first responded error.

func (*Quorum) Init

func (d *Quorum) Init()

Every future should call this method to initialize underlying error channel.

func (*Quorum) Respond

func (d *Quorum) Respond(err error)

Each future should respond error once and multiple calling with different error on the same future will have no effects.

type Statement

type Statement struct {
	Stmt *ultpb.Statement
	// contains filtered or unexported fields
}

Future for node server to add consensus statement to consensus engine.

func (*Statement) Error

func (d *Statement) Error() error

Error always return the first responded error.

func (*Statement) Init

func (d *Statement) Init()

Every future should call this method to initialize underlying error channel.

func (*Statement) Respond

func (d *Statement) Respond(err error)

Each future should respond error once and multiple calling with different error on the same future will have no effects.

type Tx

type Tx struct {
	TxKey string
	Tx    *ultpb.Tx
	// contains filtered or unexported fields
}

Future for node server to add received tx to consensus engine.

func (*Tx) Error

func (d *Tx) Error() error

Error always return the first responded error.

func (*Tx) Init

func (d *Tx) Init()

Every future should call this method to initialize underlying error channel.

func (*Tx) Respond

func (d *Tx) Respond(err error)

Each future should respond error once and multiple calling with different error on the same future will have no effects.

type TxSet

type TxSet struct {
	TxSetHash string
	TxSet     *ultpb.TxSet
	// contains filtered or unexported fields
}

Future for node server to query txset.

func (*TxSet) Error

func (d *TxSet) Error() error

Error always return the first responded error.

func (*TxSet) Init

func (d *TxSet) Init()

Every future should call this method to initialize underlying error channel.

func (*TxSet) Respond

func (d *TxSet) Respond(err error)

Each future should respond error once and multiple calling with different error on the same future will have no effects.

type TxStatus

type TxStatus struct {
	TxKey    string
	TxStatus *rpcpb.TxStatus
	// contains filtered or unexported fields
}

Future for node server to query tx status.

func (*TxStatus) Error

func (d *TxStatus) Error() error

Error always return the first responded error.

func (*TxStatus) Init

func (d *TxStatus) Init()

Every future should call this method to initialize underlying error channel.

func (*TxStatus) Respond

func (d *TxStatus) Respond(err error)

Each future should respond error once and multiple calling with different error on the same future will have no effects.

Jump to

Keyboard shortcuts

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