Documentation
¶
Index ¶
- Variables
- func NewABCIAdapter(app abci.Application) cmtabci.Application
- type ABCIAdapter
- func (a *ABCIAdapter) ApplySnapshotChunk(ctx context.Context, req *cmtabci.RequestApplySnapshotChunk) (*cmtabci.ResponseApplySnapshotChunk, error)
- func (a *ABCIAdapter) CheckTx(ctx context.Context, req *cmtabci.RequestCheckTx) (*cmtabci.ResponseCheckTx, error)
- func (a *ABCIAdapter) Commit(ctx context.Context, req *cmtabci.RequestCommit) (*cmtabci.ResponseCommit, error)
- func (a *ABCIAdapter) Echo(ctx context.Context, req *cmtabci.RequestEcho) (*cmtabci.ResponseEcho, error)
- func (a *ABCIAdapter) ExtendVote(ctx context.Context, req *cmtabci.RequestExtendVote) (*cmtabci.ResponseExtendVote, error)
- func (a *ABCIAdapter) FinalizeBlock(ctx context.Context, req *cmtabci.RequestFinalizeBlock) (*cmtabci.ResponseFinalizeBlock, error)
- func (a *ABCIAdapter) Flush(ctx context.Context, req *cmtabci.RequestFlush) (*cmtabci.ResponseFlush, error)
- func (a *ABCIAdapter) Info(ctx context.Context, req *cmtabci.RequestInfo) (*cmtabci.ResponseInfo, error)
- func (a *ABCIAdapter) InitChain(ctx context.Context, req *cmtabci.RequestInitChain) (*cmtabci.ResponseInitChain, error)
- func (a *ABCIAdapter) ListSnapshots(ctx context.Context, req *cmtabci.RequestListSnapshots) (*cmtabci.ResponseListSnapshots, error)
- func (a *ABCIAdapter) LoadSnapshotChunk(ctx context.Context, req *cmtabci.RequestLoadSnapshotChunk) (*cmtabci.ResponseLoadSnapshotChunk, error)
- func (a *ABCIAdapter) OfferSnapshot(ctx context.Context, req *cmtabci.RequestOfferSnapshot) (*cmtabci.ResponseOfferSnapshot, error)
- func (a *ABCIAdapter) PrepareProposal(ctx context.Context, req *cmtabci.RequestPrepareProposal) (*cmtabci.ResponsePrepareProposal, error)
- func (a *ABCIAdapter) ProcessProposal(ctx context.Context, req *cmtabci.RequestProcessProposal) (*cmtabci.ResponseProcessProposal, error)
- func (a *ABCIAdapter) Query(ctx context.Context, req *cmtabci.RequestQuery) (*cmtabci.ResponseQuery, error)
- func (a *ABCIAdapter) VerifyVoteExtension(ctx context.Context, req *cmtabci.RequestVerifyVoteExtension) (*cmtabci.ResponseVerifyVoteExtension, error)
- type AppConnConsensus
- type AppConnMempool
- type AppConnQuery
- type AppConnSnapshot
- type AppConns
- type ClientCreator
Constants ¶
This section is empty.
Variables ¶
var RequestInfo = abci.RequestInfo{ Version: version.TMCoreSemVer, BlockVersion: version.BlockProtocol, P2PVersion: version.P2PProtocol, }
RequestInfo contains all the information for sending the abci.RequestInfo message during handshake with the app. It contains only compile-time version information.
Functions ¶
func NewABCIAdapter ¶
func NewABCIAdapter(app abci.Application) cmtabci.Application
Types ¶
type ABCIAdapter ¶
type ABCIAdapter struct {
// contains filtered or unexported fields
}
ABCIAdapter adapts local ABCI applications to CometBFT ABCI interface
func (*ABCIAdapter) ApplySnapshotChunk ¶
func (a *ABCIAdapter) ApplySnapshotChunk(ctx context.Context, req *cmtabci.RequestApplySnapshotChunk) (*cmtabci.ResponseApplySnapshotChunk, error)
func (*ABCIAdapter) CheckTx ¶
func (a *ABCIAdapter) CheckTx(ctx context.Context, req *cmtabci.RequestCheckTx) (*cmtabci.ResponseCheckTx, error)
func (*ABCIAdapter) Commit ¶
func (a *ABCIAdapter) Commit(ctx context.Context, req *cmtabci.RequestCommit) (*cmtabci.ResponseCommit, error)
func (*ABCIAdapter) Echo ¶
func (a *ABCIAdapter) Echo(ctx context.Context, req *cmtabci.RequestEcho) (*cmtabci.ResponseEcho, error)
func (*ABCIAdapter) ExtendVote ¶
func (a *ABCIAdapter) ExtendVote(ctx context.Context, req *cmtabci.RequestExtendVote) (*cmtabci.ResponseExtendVote, error)
func (*ABCIAdapter) FinalizeBlock ¶
func (a *ABCIAdapter) FinalizeBlock(ctx context.Context, req *cmtabci.RequestFinalizeBlock) (*cmtabci.ResponseFinalizeBlock, error)
func (*ABCIAdapter) Flush ¶
func (a *ABCIAdapter) Flush(ctx context.Context, req *cmtabci.RequestFlush) (*cmtabci.ResponseFlush, error)
func (*ABCIAdapter) Info ¶
func (a *ABCIAdapter) Info(ctx context.Context, req *cmtabci.RequestInfo) (*cmtabci.ResponseInfo, error)
func (*ABCIAdapter) InitChain ¶
func (a *ABCIAdapter) InitChain(ctx context.Context, req *cmtabci.RequestInitChain) (*cmtabci.ResponseInitChain, error)
func (*ABCIAdapter) ListSnapshots ¶
func (a *ABCIAdapter) ListSnapshots(ctx context.Context, req *cmtabci.RequestListSnapshots) (*cmtabci.ResponseListSnapshots, error)
Implement other required methods with default implementations
func (*ABCIAdapter) LoadSnapshotChunk ¶
func (a *ABCIAdapter) LoadSnapshotChunk(ctx context.Context, req *cmtabci.RequestLoadSnapshotChunk) (*cmtabci.ResponseLoadSnapshotChunk, error)
func (*ABCIAdapter) OfferSnapshot ¶
func (a *ABCIAdapter) OfferSnapshot(ctx context.Context, req *cmtabci.RequestOfferSnapshot) (*cmtabci.ResponseOfferSnapshot, error)
func (*ABCIAdapter) PrepareProposal ¶
func (a *ABCIAdapter) PrepareProposal(ctx context.Context, req *cmtabci.RequestPrepareProposal) (*cmtabci.ResponsePrepareProposal, error)
func (*ABCIAdapter) ProcessProposal ¶
func (a *ABCIAdapter) ProcessProposal(ctx context.Context, req *cmtabci.RequestProcessProposal) (*cmtabci.ResponseProcessProposal, error)
func (*ABCIAdapter) Query ¶
func (a *ABCIAdapter) Query(ctx context.Context, req *cmtabci.RequestQuery) (*cmtabci.ResponseQuery, error)
func (*ABCIAdapter) VerifyVoteExtension ¶
func (a *ABCIAdapter) VerifyVoteExtension(ctx context.Context, req *cmtabci.RequestVerifyVoteExtension) (*cmtabci.ResponseVerifyVoteExtension, error)
type AppConnConsensus ¶
type AppConnConsensus interface {
FinalizeBlock(context.Context, *abci.FinalizeBlockRequest) (*abci.FinalizeBlockResponse, error)
PrepareProposal(context.Context, *abci.PrepareProposalRequest) (*abci.PrepareProposalResponse, error)
ProcessProposal(context.Context, *abci.ProcessProposalRequest) (*abci.ProcessProposalResponse, error)
ExtendVote(context.Context, *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error)
VerifyVoteExtension(context.Context, *abci.VerifyVoteExtensionRequest) (*abci.VerifyVoteExtensionResponse, error)
Commit(context.Context, *abci.CommitRequest) (*abci.CommitResponse, error)
CommitSync(context.Context, *abci.CommitRequest) (*abci.CommitResponse, error)
}
func NewAppConnConsensus ¶
func NewAppConnConsensus(client abcicli.Client) AppConnConsensus
type AppConnMempool ¶
type AppConnMempool interface {
CheckTx(context.Context, *abci.CheckTxRequest) (*abci.CheckTxResponse, error)
CheckTxAsync(*abci.CheckTxRequest) *abcicli.ReqRes
Flush(context.Context) error
SetResponseCallback(func(*abci.Request, *abci.Response))
Error() error
FlushAsync() *abcicli.ReqRes
}
func NewAppConnMempool ¶
func NewAppConnMempool(client abcicli.Client) AppConnMempool
type AppConnQuery ¶
type AppConnQuery interface {
Info(context.Context, *abci.InfoRequest) (*abci.InfoResponse, error)
Query(context.Context, *abci.QueryRequest) (*abci.QueryResponse, error)
ABCIInfo(context.Context) (*abci.InfoResponse, error)
}
func NewAppConnQuery ¶
func NewAppConnQuery(client abcicli.Client) AppConnQuery
type AppConnSnapshot ¶
type AppConnSnapshot interface {
ListSnapshots(context.Context, *abci.ListSnapshotsRequest) (*abci.ListSnapshotsResponse, error)
OfferSnapshot(context.Context, *abci.OfferSnapshotRequest) (*abci.OfferSnapshotResponse, error)
LoadSnapshotChunk(context.Context, *abci.LoadSnapshotChunkRequest) (*abci.LoadSnapshotChunkResponse, error)
ApplySnapshotChunk(context.Context, *abci.ApplySnapshotChunkRequest) (*abci.ApplySnapshotChunkResponse, error)
}
func NewAppConnSnapshot ¶
func NewAppConnSnapshot(client abcicli.Client) AppConnSnapshot
type AppConns ¶
type AppConns interface {
service.Service
// Mempool connection
Mempool() AppConnMempool
// Consensus connection
Consensus() AppConnConsensus
// Query connection
Query() AppConnQuery
// Snapshot connection
Snapshot() AppConnSnapshot
}
AppConns is the Tendermint's interface to the application that consists of multiple connections.
func NewAppConns ¶
func NewAppConns(clientCreator ClientCreator) AppConns
NewAppConns calls NewMultiAppConn.
func NewMultiAppConn ¶
func NewMultiAppConn(clientCreator ClientCreator) AppConns
NewMultiAppConn makes all necessary abci connections to the application.
type ClientCreator ¶
type ClientCreator interface {
// NewABCIClient returns a new ABCI client.
NewABCIClient() (abcicli.Client, error)
}
ClientCreator creates new ABCI clients.
func DefaultClientCreator ¶
func DefaultClientCreator(addr, transport, dbDir string) ClientCreator
DefaultClientCreator returns a default ClientCreator, which will create a local client if addr is one of: 'kvstore', 'persistent_kvstore' or 'noop', otherwise - a remote client.
func NewLocalClientCreator ¶
func NewLocalClientCreator(app abci.Application) ClientCreator
NewLocalClientCreator returns a ClientCreator for the given app, which will be running locally.
func NewRemoteClientCreator ¶
func NewRemoteClientCreator(addr, transport string, mustConnect bool) ClientCreator
NewRemoteClientCreator returns a ClientCreator for the given address (e.g. "192.168.0.1") and transport (e.g. "tcp"). Set mustConnect to true if you want the client to connect before reporting success.