Documentation ¶
Index ¶
Constants ¶
View Source
const ( OK = types.CodeType_OK LOG = "" )
Variables ¶
This section is empty.
Functions ¶
func NewGRPCClient ¶
func NewLocalClient ¶
func NewLocalClient(mtx *sync.Mutex, app types.Application) *localClient
func NewSocketClient ¶
Types ¶
type Client ¶
type Client interface { cmn.Service SetResponseCallback(Callback) Error() error FlushAsync() *ReqRes EchoAsync(msg string) *ReqRes InfoAsync(types.RequestInfo) *ReqRes SetOptionAsync(key string, value string) *ReqRes DeliverTxAsync(tx []byte) *ReqRes CheckTxAsync(tx []byte) *ReqRes QueryAsync(types.RequestQuery) *ReqRes CommitAsync() *ReqRes FlushSync() error EchoSync(msg string) (res types.Result) InfoSync(types.RequestInfo) (resInfo types.ResponseInfo, err error) SetOptionSync(key string, value string) (res types.Result) DeliverTxSync(tx []byte) (res types.Result) CheckTxSync(tx []byte) (res types.Result) QuerySync(types.RequestQuery) (resQuery types.ResponseQuery, err error) CommitSync() (res types.Result) InitChainAsync(types.RequestInitChain) *ReqRes BeginBlockAsync(types.RequestBeginBlock) *ReqRes EndBlockAsync(height uint64) *ReqRes InitChainSync(types.RequestInitChain) (err error) BeginBlockSync(types.RequestBeginBlock) (err error) EndBlockSync(height uint64) (resEndBlock types.ResponseEndBlock, err error) }
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.