Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { service.Service SetResponseCallback(Callback) Error() error FlushAsync() *ReqRes EchoAsync(msg string) *ReqRes InfoAsync(types.RequestInfo) *ReqRes SetOptionAsync(types.RequestSetOption) *ReqRes DeliverTxAsync(types.RequestDeliverTx) *ReqRes PreDeliverRealTxAsync([]byte) types.TxEssentials DeliverRealTxAsync(types.TxEssentials) *ReqRes CheckTxAsync(types.RequestCheckTx) *ReqRes QueryAsync(types.RequestQuery) *ReqRes CommitAsync(types.RequestCommit) *ReqRes InitChainAsync(types.RequestInitChain) *ReqRes BeginBlockAsync(types.RequestBeginBlock) *ReqRes EndBlockAsync(types.RequestEndBlock) *ReqRes FlushSync() error EchoSync(msg string) (*types.ResponseEcho, error) InfoSync(types.RequestInfo) (*types.ResponseInfo, error) SetOptionSync(types.RequestSetOption) (*types.ResponseSetOption, error) DeliverTxSync(types.RequestDeliverTx) (*types.ResponseDeliverTx, error) CheckTxSync(types.RequestCheckTx) (*types.ResponseCheckTx, error) QuerySync(types.RequestQuery) (*types.ResponseQuery, error) CommitSync(types.RequestCommit) (*types.ResponseCommit, error) InitChainSync(types.RequestInitChain) (*types.ResponseInitChain, error) BeginBlockSync(types.RequestBeginBlock) (*types.ResponseBeginBlock, error) EndBlockSync(types.RequestEndBlock) (*types.ResponseEndBlock, error) ParallelTxs([][]byte, bool) []*types.ResponseDeliverTx }
Client defines an interface for an ABCI client. All `Async` methods return a `ReqRes` object. All `Sync` methods return the appropriate protobuf ResponseXxx struct and an error. Note these are client errors, eg. ABCI socket connectivity issues. Application-related errors are reflected in response via ABCI error codes and logs.
func NewLocalClient ¶
func NewLocalClient(mtx *sync.Mutex, app types.Application) Client
type ReqRes ¶
type ReqRes struct { *types.Request *sync.WaitGroup *types.Response // Not set atomically, so be sure to use WaitGroup. // contains filtered or unexported fields }
func (*ReqRes) GetCallback ¶
func (*ReqRes) SetCallback ¶
Sets the callback for this ReqRes atomically. If reqRes is already done, calls cb immediately. NOTE: reqRes.cb should not change if reqRes.done. NOTE: only one callback is supported.
Click to show internal directories.
Click to hide internal directories.