Documentation ¶
Overview ¶
Package node provides functions to configure, initialize, and execute a Tendermint node. It does not implement an ABCI application - that implementation must be provided by the caller.
Index ¶
- Variables
- func Init(opts InitOptions) (bootstrap genesis.Bootstrap, err error)
- type AppFactory
- type InitOptions
- type LocalClient
- func (c *LocalClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, ...) (*core.ResultABCIQuery, error)
- func (c *LocalClient) BroadcastTxAsync(ctx context.Context, tx tm.Tx) (*core.ResultBroadcastTx, error)
- func (c *LocalClient) BroadcastTxSync(ctx context.Context, tx tm.Tx) (*core.ResultBroadcastTx, error)
- func (c *LocalClient) CheckTx(ctx context.Context, tx tm.Tx) (*core.ResultCheckTx, error)
- func (c *LocalClient) Set(client *local.Local)
- func (c *LocalClient) Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan core.ResultEvent, err error)
- func (c *LocalClient) Tx(ctx context.Context, hash []byte, prove bool) (*core.ResultTx, error)
- type Node
Constants ¶
This section is empty.
Variables ¶
var ErrNotInitialized = errors.New("not initialized")
Functions ¶
Types ¶
type AppFactory ¶
type AppFactory func(*privval.FilePV) (abci.Application, error)
AppFactory creates and returns an ABCI application.
type InitOptions ¶
type LocalClient ¶
type LocalClient struct {
// contains filtered or unexported fields
}
LocalClient is a proxy for local.Local that is used when a local client is needed before the node has been started.
func (*LocalClient) ABCIQueryWithOptions ¶
func (c *LocalClient) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, opts client.ABCIQueryOptions) (*core.ResultABCIQuery, error)
ABCIQueryWithOptions implements client.ABCIClient.ABCIQueryWithOptions. Returns ErrNotInitialized if Set has not been called.
func (*LocalClient) BroadcastTxAsync ¶
func (c *LocalClient) BroadcastTxAsync(ctx context.Context, tx tm.Tx) (*core.ResultBroadcastTx, error)
BroadcastTxAsync implements client.ABCIClient.BroadcastTxAsync. If Set has not been called, the transaction is queued and will be sent when Set is called.
func (*LocalClient) BroadcastTxSync ¶
func (c *LocalClient) BroadcastTxSync(ctx context.Context, tx tm.Tx) (*core.ResultBroadcastTx, error)
BroadcastTxSync implements client.ABCIClient.BroadcastTxSync. Returns ErrNotInitialized if Set has not been called.
func (*LocalClient) CheckTx ¶
func (c *LocalClient) CheckTx(ctx context.Context, tx tm.Tx) (*core.ResultCheckTx, error)
CheckTx implements client.MempoolClient.CheckTx. Returns ErrNotInitialized if Set has not been called.
func (*LocalClient) Set ¶
func (c *LocalClient) Set(client *local.Local)
Set sets the local.Local client, transmitting any queued transactions.
func (*LocalClient) Subscribe ¶
func (c *LocalClient) Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan core.ResultEvent, err error)
Subscribe implements client.EventsClient.Subscribe. Returns ErrNotInitialized if Set has not been called.