Documentation
¶
Index ¶
Constants ¶
const ( // MetricsSubsystem is a subsystem shared by all metrics exposed by this // package. MetricsSubsystem = "abci_connection" )
Variables ¶
var RequestInfo = abci.RequestInfo{ Version: version.TMVersion, BlockVersion: version.BlockProtocol, P2PVersion: version.P2PProtocol, AbciVersion: version.ABCIVersion, }
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 DefaultClientCreator ¶
func DefaultClientCreator(addr, transport, dbDir string) (abciclient.Creator, io.Closer)
DefaultClientCreator returns a default ClientCreator, which will create a local client if addr is one of: 'kvstore', 'persistent_kvstore', 'e2e', or 'noop', otherwise - a remote client.
The Closer is a noop except for persistent_kvstore applications, which will clean up the store.
Types ¶
type AppConnConsensus ¶
type AppConnConsensus interface {
SetResponseCallback(abciclient.Callback)
Error() error
InitChainSync(context.Context, types.RequestInitChain) (*types.ResponseInitChain, error)
BeginBlockSync(context.Context, types.RequestBeginBlock) (*types.ResponseBeginBlock, error)
DeliverTxAsync(context.Context, types.RequestDeliverTx) (*abciclient.ReqRes, error)
EndBlockSync(context.Context, types.RequestEndBlock) (*types.ResponseEndBlock, error)
CommitSync(context.Context) (*types.ResponseCommit, error)
}
func NewAppConnConsensus ¶
func NewAppConnConsensus(appConn abciclient.Client, metrics *Metrics) AppConnConsensus
type AppConnMempool ¶
type AppConnMempool interface {
SetResponseCallback(abciclient.Callback)
Error() error
CheckTxAsync(context.Context, types.RequestCheckTx) (*abciclient.ReqRes, error)
CheckTxSync(context.Context, types.RequestCheckTx) (*types.ResponseCheckTx, error)
FlushAsync(context.Context) (*abciclient.ReqRes, error)
FlushSync(context.Context) error
}
func NewAppConnMempool ¶
func NewAppConnMempool(appConn abciclient.Client, metrics *Metrics) AppConnMempool
type AppConnQuery ¶
type AppConnQuery interface {
Error() error
EchoSync(context.Context, string) (*types.ResponseEcho, error)
InfoSync(context.Context, types.RequestInfo) (*types.ResponseInfo, error)
QuerySync(context.Context, types.RequestQuery) (*types.ResponseQuery, error)
}
func NewAppConnQuery ¶
func NewAppConnQuery(appConn abciclient.Client, metrics *Metrics) AppConnQuery
type AppConnSnapshot ¶
type AppConnSnapshot interface {
Error() error
ListSnapshotsSync(context.Context, types.RequestListSnapshots) (*types.ResponseListSnapshots, error)
OfferSnapshotSync(context.Context, types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)
LoadSnapshotChunkSync(context.Context, types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)
ApplySnapshotChunkSync(context.Context, types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)
}
func NewAppConnSnapshot ¶
func NewAppConnSnapshot(appConn abciclient.Client, metrics *Metrics) 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 abciclient.Creator, metrics *Metrics) AppConns
NewAppConns calls NewMultiAppConn.
func NewMultiAppConn ¶
func NewMultiAppConn(clientCreator abciclient.Creator, metrics *Metrics) AppConns
NewMultiAppConn makes all necessary abci connections to the application.
type Metrics ¶ added in v0.35.1
Metrics contains the prometheus metrics exposed by the proxy package.
func NopMetrics ¶ added in v0.35.1
func NopMetrics() *Metrics
NopMetrics constructs a Metrics instance that discards all samples and is suitable for testing.
func PrometheusMetrics ¶ added in v0.35.1
PrometheusMetrics constructs a Metrics instance that collects metrics samples. The resulting metrics will be prefixed with namespace and labeled with the defaultLabelsAndValues. defaultLabelsAndValues must be a list of string pairs where the first of each pair is the label and the second is the value.