mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-06 12:00:44 +00:00
`abci.Client`:
- Sync and Async methods now accept a context for cancellation
* grpc client uses context to cancel both Sync and Async requests
* local client ignores context parameter
* socket client uses context to cancel Sync requests and to drop Async requests before sending them if context was cancelled prior to that
- Async methods return an error
* socket client returns an error immediately if queue is full for Async requests
* local client always returns nil error
* grpc client returns an error if context was cancelled before we got response or the receiving queue had a space for response (do not confuse with the sending queue from the socket client)
- specify clients semantics in [doc.go](https://raw.githubusercontent.com/tendermint/tendermint/27112fffa62276bc016d56741f686f0f77931748/abci/client/doc.go)
`mempool.TxInfo`
- add optional `Context` to `TxInfo`, which can be used to cancel `CheckTx` request
Closes #5190
30 lines
955 B
Go
30 lines
955 B
Go
// Package abcicli provides an ABCI implementation in Go.
|
|
//
|
|
// There are 3 clients available:
|
|
// 1. socket (unix or TCP)
|
|
// 2. local (in memory)
|
|
// 3. gRPC
|
|
//
|
|
// ## Socket client
|
|
//
|
|
// async: the client maintains an internal buffer of a fixed size. when the
|
|
// buffer becomes full, all Async calls will return an error immediately.
|
|
//
|
|
// sync: the client blocks on 1) enqueuing the Sync request 2) enqueuing the
|
|
// Flush requests 3) waiting for the Flush response
|
|
//
|
|
// ## Local client
|
|
//
|
|
// async: global mutex is locked during each call (meaning it's not really async!)
|
|
// sync: global mutex is locked during each call
|
|
//
|
|
// ## gRPC client
|
|
//
|
|
// async: gRPC is synchronous, but an internal buffer of a fixed size is used
|
|
// to store responses and later call callbacks (separate goroutine per
|
|
// response).
|
|
//
|
|
// sync: waits for all Async calls to complete (essentially what Flush does in
|
|
// the socket client) and calls Sync method.
|
|
package abcicli
|