Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLocalClient ¶
func NewLocalClient(mtx *sync.Mutex, app abci.Application) *localClient
Types ¶
type Client ¶
type Client interface { service.Service SetResponseCallback(Callback) Error() error FlushAsync() *ReqRes EchoAsync(msg string) *ReqRes InfoAsync(abci.RequestInfo) *ReqRes SetOptionAsync(abci.RequestSetOption) *ReqRes DeliverTxAsync(abci.RequestDeliverTx) *ReqRes CheckTxAsync(abci.RequestCheckTx) *ReqRes QueryAsync(abci.RequestQuery) *ReqRes CommitAsync() *ReqRes InitChainAsync(abci.RequestInitChain) *ReqRes BeginBlockAsync(abci.RequestBeginBlock) *ReqRes EndBlockAsync(abci.RequestEndBlock) *ReqRes FlushSync() error EchoSync(msg string) (abci.ResponseEcho, error) InfoSync(abci.RequestInfo) (abci.ResponseInfo, error) SetOptionSync(abci.RequestSetOption) (abci.ResponseSetOption, error) DeliverTxSync(abci.RequestDeliverTx) (abci.ResponseDeliverTx, error) CheckTxSync(abci.RequestCheckTx) (abci.ResponseCheckTx, error) QuerySync(abci.RequestQuery) (abci.ResponseQuery, error) CommitSync() (abci.ResponseCommit, error) InitChainSync(abci.RequestInitChain) (abci.ResponseInitChain, error) BeginBlockSync(abci.RequestBeginBlock) (abci.ResponseBeginBlock, error) EndBlockSync(abci.RequestEndBlock) (abci.ResponseEndBlock, error) }
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.
type ReqRes ¶
func (*ReqRes) Done ¶
func (reqRes *ReqRes) Done()
NOTE: it should be safe to read reqRes.cb without locks after this.
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.
func (*ReqRes) SetResponse ¶
Click to show internal directories.
Click to hide internal directories.