Documentation ¶
Index ¶
- type Callback
- type Client
- func NewClient(addr, transport string, mustConnect bool) (Client, error)
- func NewGRPCClient(addr string, mustConnect bool) Client
- func NewLocalClient(mtx *bcsync.Mutex, app types.Application) Client
- func NewSocketClient(addr string, mustConnect bool) Client
- func NewSocketClientWithConfig(addr string, mustConnect bool, config *ConnConfig) Client
- type ConnConfig
- type ReqRes
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 // Async methods FlushAsync() *ReqRes EchoAsync(msg string) *ReqRes InfoAsync(types.RequestInfo) *ReqRes DeliverTxAsync(types.RequestDeliverTx) *ReqRes CheckTxAsync(types.RequestCheckTx) *ReqRes QueryAsync(types.RequestQuery) *ReqRes CommitAsync() *ReqRes InitChainAsync(types.RequestInitChain) *ReqRes PrepareProposalAsync(types.RequestPrepareProposal) *ReqRes BeginBlockAsync(types.RequestBeginBlock) *ReqRes EndBlockAsync(types.RequestEndBlock) *ReqRes ListSnapshotsAsync(types.RequestListSnapshots) *ReqRes OfferSnapshotAsync(types.RequestOfferSnapshot) *ReqRes LoadSnapshotChunkAsync(types.RequestLoadSnapshotChunk) *ReqRes ApplySnapshotChunkAsync(types.RequestApplySnapshotChunk) *ReqRes ProcessProposalAsync(types.RequestProcessProposal) *ReqRes // Sync methods FlushSync() error EchoSync(msg string) (*types.ResponseEcho, error) InfoSync(types.RequestInfo) (*types.ResponseInfo, error) DeliverTxSync(types.RequestDeliverTx) (*types.ResponseDeliverTx, error) CheckTxSync(types.RequestCheckTx) (*types.ResponseCheckTx, error) QuerySync(types.RequestQuery) (*types.ResponseQuery, error) CommitSync() (*types.ResponseCommit, error) InitChainSync(types.RequestInitChain) (*types.ResponseInitChain, error) PrepareProposalSync(types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) BeginBlockSync(types.RequestBeginBlock) (*types.ResponseBeginBlock, error) EndBlockSync(types.RequestEndBlock) (*types.ResponseEndBlock, error) ListSnapshotsSync(types.RequestListSnapshots) (*types.ResponseListSnapshots, error) OfferSnapshotSync(types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) LoadSnapshotChunkSync(types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) ApplySnapshotChunkSync(types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) ProcessProposalSync(types.RequestProcessProposal) (*types.ResponseProcessProposal, error) }
Client defines the interface for ABCI client implementations
func NewGRPCClient ¶
func NewLocalClient ¶
func NewLocalClient(mtx *bcsync.Mutex, app types.Application) Client
func NewSocketClient ¶
func NewSocketClientWithConfig ¶
func NewSocketClientWithConfig(addr string, mustConnect bool, config *ConnConfig) Client
type ConnConfig ¶
type ConnConfig struct {
// contains filtered or unexported fields
}
func DefaultConnConfig ¶
func DefaultConnConfig() *ConnConfig
type ReqRes ¶
type ReqRes struct { *types.Request *sync.WaitGroup *types.Response // contains filtered or unexported fields }
ReqRes represents a request-response pair
func (*ReqRes) GetCallback ¶
GetCallback returns the current callback function
func (*ReqRes) InvokeCallback ¶
func (r *ReqRes) InvokeCallback()
InvokeCallback invokes the response callback if set
func (*ReqRes) SetCallback ¶
SetCallback sets the response callback
Click to show internal directories.
Click to hide internal directories.