Documentation ¶
Index ¶
- type Local
- func (c *Local) ABCIInfo(ctx context.Context) (*ctypes.ResultABCIInfo, error)
- func (c *Local) ABCIQuery(ctx context.Context, path string, data bytes.HexBytes) (*ctypes.ResultABCIQuery, error)
- func (c *Local) ABCIQueryWithOptions(ctx context.Context, path string, data bytes.HexBytes, ...) (*ctypes.ResultABCIQuery, error)
- func (c *Local) Block(ctx context.Context, height *int64) (*ctypes.ResultBlock, error)
- func (c *Local) BlockByHash(ctx context.Context, hash []byte) (*ctypes.ResultBlock, error)
- func (c *Local) BlockResults(ctx context.Context, height *int64) (*ctypes.ResultBlockResults, error)
- func (c *Local) BlockSearch(_ context.Context, query string, page, perPage *int, orderBy string) (*ctypes.ResultBlockSearch, error)
- func (c *Local) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error)
- func (c *Local) BroadcastEvidence(ctx context.Context, ev types.Evidence) (*ctypes.ResultBroadcastEvidence, error)
- func (c *Local) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *Local) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error)
- func (c *Local) BroadcastTxSync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *Local) CheckTx(ctx context.Context, tx types.Tx) (*ctypes.ResultCheckTx, error)
- func (c *Local) Commit(ctx context.Context, height *int64) (*ctypes.ResultCommit, error)
- func (c *Local) ConsensusParams(ctx context.Context, height *int64) (*ctypes.ResultConsensusParams, error)
- func (c *Local) ConsensusState(ctx context.Context) (*ctypes.ResultConsensusState, error)
- func (c *Local) DialPeers(ctx context.Context, peers []string, persistent, unconditional, private bool) (*ctypes.ResultDialPeers, error)
- func (c *Local) DialSeeds(ctx context.Context, seeds []string) (*ctypes.ResultDialSeeds, error)
- func (c *Local) DumpConsensusState(ctx context.Context) (*ctypes.ResultDumpConsensusState, error)
- func (c *Local) Genesis(ctx context.Context) (*ctypes.ResultGenesis, error)
- func (c *Local) Health(ctx context.Context) (*ctypes.ResultHealth, error)
- func (c *Local) NetInfo(ctx context.Context) (*ctypes.ResultNetInfo, error)
- func (c *Local) NumUnconfirmedTxs(ctx context.Context) (*ctypes.ResultUnconfirmedTxs, error)
- func (c *Local) SetLogger(l log.Logger)
- func (c *Local) Status(ctx context.Context) (*ctypes.ResultStatus, error)
- func (c *Local) Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan ctypes.ResultEvent, err error)
- func (c *Local) Tx(ctx context.Context, hash []byte, prove bool) (*ctypes.ResultTx, error)
- func (c *Local) TxSearch(_ context.Context, query string, prove bool, page, perPage *int, ...) (*ctypes.ResultTxSearch, error)
- func (c *Local) UnconfirmedTxs(ctx context.Context, limit *int) (*ctypes.ResultUnconfirmedTxs, error)
- func (c *Local) Unsubscribe(ctx context.Context, subscriber, query string) error
- func (c *Local) UnsubscribeAll(ctx context.Context, subscriber string) error
- func (c *Local) Validators(ctx context.Context, height *int64, page, perPage *int) (*ctypes.ResultValidators, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Local ¶
Local is a Client implementation that directly executes the rpc functions on a given node, without going through HTTP or GRPC.
This implementation is useful for:
* Running tests against a node in-process without the overhead of going through an http server * Communication between an ABCI app and Tendermint core when they are compiled in process.
For real clients, you probably want to use client.HTTP. For more powerful control during testing, you probably want the "client/mock" package.
You can subscribe for any event published by Tendermint using Subscribe method. Note delivery is best-effort. If you don't read events fast enough, Tendermint might cancel the subscription. The client will attempt to resubscribe (you don't need to do anything). It will keep trying indefinitely with exponential backoff (10ms -> 20ms -> 40ms) until successful.