Documentation
¶
Index ¶
- Variables
- type ABCIClientVersion
- type Multiplexer
- func (m *Multiplexer) ApplySnapshotChunk(_ context.Context, req *abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error)
- func (m *Multiplexer) CheckTx(_ context.Context, req *abci.RequestCheckTx) (*abci.ResponseCheckTx, error)
- func (m *Multiplexer) Cleanup() error
- func (m *Multiplexer) Commit(context.Context, *abci.RequestCommit) (*abci.ResponseCommit, error)
- func (m *Multiplexer) ExtendVote(ctx context.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error)
- func (m *Multiplexer) FinalizeBlock(_ context.Context, req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)
- func (m *Multiplexer) Info(_ context.Context, req *abci.RequestInfo) (*abci.ResponseInfo, error)
- func (m *Multiplexer) InitChain(_ context.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (m *Multiplexer) ListSnapshots(_ context.Context, req *abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error)
- func (m *Multiplexer) LoadSnapshotChunk(_ context.Context, req *abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error)
- func (m *Multiplexer) OfferSnapshot(_ context.Context, req *abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error)
- func (m *Multiplexer) PrepareProposal(_ context.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
- func (m *Multiplexer) ProcessProposal(_ context.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)
- func (m *Multiplexer) Query(ctx context.Context, req *abci.RequestQuery) (*abci.ResponseQuery, error)
- func (m *Multiplexer) Start() error
- func (m *Multiplexer) VerifyVoteExtension(_ context.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error)
- type RemoteABCIClientV1
- func (a *RemoteABCIClientV1) ApplySnapshotChunk(req *abciv2.RequestApplySnapshotChunk) (*abciv2.ResponseApplySnapshotChunk, error)
- func (a *RemoteABCIClientV1) CheckTx(req *abciv2.RequestCheckTx) (*abciv2.ResponseCheckTx, error)
- func (a *RemoteABCIClientV1) Commit() (*abciv2.ResponseCommit, error)
- func (a *RemoteABCIClientV1) ExtendVote(ctx context.Context, req *abciv2.RequestExtendVote) (*abciv2.ResponseExtendVote, error)
- func (a *RemoteABCIClientV1) FinalizeBlock(req *abciv2.RequestFinalizeBlock) (*abciv2.ResponseFinalizeBlock, error)
- func (a *RemoteABCIClientV1) Info(req *abciv2.RequestInfo) (*abciv2.ResponseInfo, error)
- func (a *RemoteABCIClientV1) InitChain(req *abciv2.RequestInitChain) (*abciv2.ResponseInitChain, error)
- func (a *RemoteABCIClientV1) ListSnapshots(req *abciv2.RequestListSnapshots) (*abciv2.ResponseListSnapshots, error)
- func (a *RemoteABCIClientV1) LoadSnapshotChunk(req *abciv2.RequestLoadSnapshotChunk) (*abciv2.ResponseLoadSnapshotChunk, error)
- func (a *RemoteABCIClientV1) OfferSnapshot(req *abciv2.RequestOfferSnapshot) (*abciv2.ResponseOfferSnapshot, error)
- func (a *RemoteABCIClientV1) PrepareProposal(req *abciv2.RequestPrepareProposal) (*abciv2.ResponsePrepareProposal, error)
- func (a *RemoteABCIClientV1) ProcessProposal(req *abciv2.RequestProcessProposal) (*abciv2.ResponseProcessProposal, error)
- func (a *RemoteABCIClientV1) Query(ctx context.Context, req *abciv2.RequestQuery) (*abciv2.ResponseQuery, error)
- func (a *RemoteABCIClientV1) VerifyVoteExtension(req *abciv2.RequestVerifyVoteExtension) (*abciv2.ResponseVerifyVoteExtension, error)
- type RemoteABCIClientV2
- func (a *RemoteABCIClientV2) ApplySnapshotChunk(req *abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error)
- func (a *RemoteABCIClientV2) CheckTx(req *abci.RequestCheckTx) (*abci.ResponseCheckTx, error)
- func (a *RemoteABCIClientV2) Commit() (*abci.ResponseCommit, error)
- func (a *RemoteABCIClientV2) ExtendVote(ctx context.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error)
- func (a *RemoteABCIClientV2) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)
- func (a *RemoteABCIClientV2) Info(req *abci.RequestInfo) (*abci.ResponseInfo, error)
- func (a *RemoteABCIClientV2) InitChain(req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (a *RemoteABCIClientV2) ListSnapshots(req *abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error)
- func (a *RemoteABCIClientV2) LoadSnapshotChunk(req *abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error)
- func (a *RemoteABCIClientV2) OfferSnapshot(req *abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error)
- func (a *RemoteABCIClientV2) PrepareProposal(req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
- func (a *RemoteABCIClientV2) ProcessProposal(req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)
- func (a *RemoteABCIClientV2) Query(ctx context.Context, req *abci.RequestQuery) (*abci.ResponseQuery, error)
- func (a *RemoteABCIClientV2) VerifyVoteExtension(req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error)
- type Version
- type Versions
Constants ¶
This section is empty.
Variables ¶
var ErrNoVersionFound = errors.New("no version found")
ErrNoVersionFound is returned when no remote version is found for a given app version.
Functions ¶
This section is empty.
Types ¶
type ABCIClientVersion ¶
type ABCIClientVersion int
const ( ABCIClientVersion1 ABCIClientVersion = iota ABCIClientVersion2 )
func (ABCIClientVersion) String ¶
func (v ABCIClientVersion) String() string
type Multiplexer ¶
type Multiplexer struct {
// contains filtered or unexported fields
}
Multiplexer is responsible for managing multiple versions of applications and coordinating their lifecycle. It handles version switching between embedded and native applications. It manages configuration, connection setup, and cleanup functions for all associated services and resources.
func NewMultiplexer ¶
func NewMultiplexer(svrCtx *server.Context, svrCfg serverconfig.Config, clientCtx client.Context, appCreator servertypes.AppCreator, versions Versions, chainID string, applicationVersion uint64) (*Multiplexer, error)
NewMultiplexer creates a new Multiplexer.
func (*Multiplexer) ApplySnapshotChunk ¶
func (m *Multiplexer) ApplySnapshotChunk(_ context.Context, req *abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error)
func (*Multiplexer) CheckTx ¶
func (m *Multiplexer) CheckTx(_ context.Context, req *abci.RequestCheckTx) (*abci.ResponseCheckTx, error)
func (*Multiplexer) Cleanup ¶
func (m *Multiplexer) Cleanup() error
Cleanup allows proper multiplexer termination.
func (*Multiplexer) Commit ¶
func (m *Multiplexer) Commit(context.Context, *abci.RequestCommit) (*abci.ResponseCommit, error)
func (*Multiplexer) ExtendVote ¶
func (m *Multiplexer) ExtendVote(ctx context.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error)
func (*Multiplexer) FinalizeBlock ¶
func (m *Multiplexer) FinalizeBlock(_ context.Context, req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)
func (*Multiplexer) Info ¶
func (m *Multiplexer) Info(_ context.Context, req *abci.RequestInfo) (*abci.ResponseInfo, error)
func (*Multiplexer) InitChain ¶
func (m *Multiplexer) InitChain(_ context.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
func (*Multiplexer) ListSnapshots ¶
func (m *Multiplexer) ListSnapshots(_ context.Context, req *abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error)
func (*Multiplexer) LoadSnapshotChunk ¶
func (m *Multiplexer) LoadSnapshotChunk(_ context.Context, req *abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error)
func (*Multiplexer) OfferSnapshot ¶
func (m *Multiplexer) OfferSnapshot(_ context.Context, req *abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error)
func (*Multiplexer) PrepareProposal ¶
func (m *Multiplexer) PrepareProposal(_ context.Context, req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
func (*Multiplexer) ProcessProposal ¶
func (m *Multiplexer) ProcessProposal(_ context.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)
func (*Multiplexer) Query ¶
func (m *Multiplexer) Query(ctx context.Context, req *abci.RequestQuery) (*abci.ResponseQuery, error)
func (*Multiplexer) Start ¶
func (m *Multiplexer) Start() error
func (*Multiplexer) VerifyVoteExtension ¶
func (m *Multiplexer) VerifyVoteExtension(_ context.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error)
type RemoteABCIClientV1 ¶
type RemoteABCIClientV1 struct {
abciv1.ABCIApplicationClient
// contains filtered or unexported fields
}
func NewRemoteABCIClientV1 ¶
func NewRemoteABCIClientV1(conn *grpc.ClientConn, chainID string) *RemoteABCIClientV1
NewRemoteABCIClientV1 returns a new ABCI Client (using ABCI v1). The client behaves like Tendermint for the server side (the application side).
func (*RemoteABCIClientV1) ApplySnapshotChunk ¶
func (a *RemoteABCIClientV1) ApplySnapshotChunk(req *abciv2.RequestApplySnapshotChunk) (*abciv2.ResponseApplySnapshotChunk, error)
ApplySnapshotChunk implements abciv2.ABCI
func (*RemoteABCIClientV1) CheckTx ¶
func (a *RemoteABCIClientV1) CheckTx(req *abciv2.RequestCheckTx) (*abciv2.ResponseCheckTx, error)
CheckTx implements abciv2.ABCI
func (*RemoteABCIClientV1) Commit ¶
func (a *RemoteABCIClientV1) Commit() (*abciv2.ResponseCommit, error)
Commit implements abciv2.ABCI
func (*RemoteABCIClientV1) ExtendVote ¶
func (a *RemoteABCIClientV1) ExtendVote(ctx context.Context, req *abciv2.RequestExtendVote) (*abciv2.ResponseExtendVote, error)
ExtendVote implements abciv2.ABCI
func (*RemoteABCIClientV1) FinalizeBlock ¶
func (a *RemoteABCIClientV1) FinalizeBlock(req *abciv2.RequestFinalizeBlock) (*abciv2.ResponseFinalizeBlock, error)
FinalizeBlock implements abciv2.ABCI
func (*RemoteABCIClientV1) Info ¶
func (a *RemoteABCIClientV1) Info(req *abciv2.RequestInfo) (*abciv2.ResponseInfo, error)
Info implements abciv2.ABCI
func (*RemoteABCIClientV1) InitChain ¶
func (a *RemoteABCIClientV1) InitChain(req *abciv2.RequestInitChain) (*abciv2.ResponseInitChain, error)
InitChain implements abciv2.ABCI
func (*RemoteABCIClientV1) ListSnapshots ¶
func (a *RemoteABCIClientV1) ListSnapshots(req *abciv2.RequestListSnapshots) (*abciv2.ResponseListSnapshots, error)
ListSnapshots implements abciv2.ABCI
func (*RemoteABCIClientV1) LoadSnapshotChunk ¶
func (a *RemoteABCIClientV1) LoadSnapshotChunk(req *abciv2.RequestLoadSnapshotChunk) (*abciv2.ResponseLoadSnapshotChunk, error)
LoadSnapshotChunk implements abciv2.ABCI
func (*RemoteABCIClientV1) OfferSnapshot ¶
func (a *RemoteABCIClientV1) OfferSnapshot(req *abciv2.RequestOfferSnapshot) (*abciv2.ResponseOfferSnapshot, error)
OfferSnapshot implements abciv2.ABCI
func (*RemoteABCIClientV1) PrepareProposal ¶
func (a *RemoteABCIClientV1) PrepareProposal(req *abciv2.RequestPrepareProposal) (*abciv2.ResponsePrepareProposal, error)
PrepareProposal implements abciv2.ABCI
func (*RemoteABCIClientV1) ProcessProposal ¶
func (a *RemoteABCIClientV1) ProcessProposal(req *abciv2.RequestProcessProposal) (*abciv2.ResponseProcessProposal, error)
ProcessProposal implements abciv2.ABCI
func (*RemoteABCIClientV1) Query ¶
func (a *RemoteABCIClientV1) Query(ctx context.Context, req *abciv2.RequestQuery) (*abciv2.ResponseQuery, error)
Query implements abciv2.ABCI
func (*RemoteABCIClientV1) VerifyVoteExtension ¶
func (a *RemoteABCIClientV1) VerifyVoteExtension(req *abciv2.RequestVerifyVoteExtension) (*abciv2.ResponseVerifyVoteExtension, error)
VerifyVoteExtension implements abciv2.ABCI
type RemoteABCIClientV2 ¶
type RemoteABCIClientV2 struct {
abci.ABCIClient
}
func NewRemoteABCIClientV2 ¶
func NewRemoteABCIClientV2(conn *grpc.ClientConn) *RemoteABCIClientV2
NewRemoteABCIClientV2 returns a new ABCI Client (using ABCI v2). The client behaves like CometBFT for the server side (the application side).
func (*RemoteABCIClientV2) ApplySnapshotChunk ¶
func (a *RemoteABCIClientV2) ApplySnapshotChunk(req *abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error)
ApplySnapshotChunk implements abci.ABCI.
func (*RemoteABCIClientV2) CheckTx ¶
func (a *RemoteABCIClientV2) CheckTx(req *abci.RequestCheckTx) (*abci.ResponseCheckTx, error)
CheckTx implements abci.ABCI.
func (*RemoteABCIClientV2) Commit ¶
func (a *RemoteABCIClientV2) Commit() (*abci.ResponseCommit, error)
Commit implements abci.ABCI.
func (*RemoteABCIClientV2) ExtendVote ¶
func (a *RemoteABCIClientV2) ExtendVote(ctx context.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error)
ExtendVote implements abci.ABCI.
func (*RemoteABCIClientV2) FinalizeBlock ¶
func (a *RemoteABCIClientV2) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)
FinalizeBlock implements abci.ABCI.
func (*RemoteABCIClientV2) Info ¶
func (a *RemoteABCIClientV2) Info(req *abci.RequestInfo) (*abci.ResponseInfo, error)
Info implements abci.ABCI.
func (*RemoteABCIClientV2) InitChain ¶
func (a *RemoteABCIClientV2) InitChain(req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChain implements abci.ABCI.
func (*RemoteABCIClientV2) ListSnapshots ¶
func (a *RemoteABCIClientV2) ListSnapshots(req *abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error)
ListSnapshots implements abci.ABCI.
func (*RemoteABCIClientV2) LoadSnapshotChunk ¶
func (a *RemoteABCIClientV2) LoadSnapshotChunk(req *abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error)
LoadSnapshotChunk implements abci.ABCI.
func (*RemoteABCIClientV2) OfferSnapshot ¶
func (a *RemoteABCIClientV2) OfferSnapshot(req *abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error)
OfferSnapshot implements abci.ABCI.
func (*RemoteABCIClientV2) PrepareProposal ¶
func (a *RemoteABCIClientV2) PrepareProposal(req *abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
PrepareProposal implements abci.ABCI.
func (*RemoteABCIClientV2) ProcessProposal ¶
func (a *RemoteABCIClientV2) ProcessProposal(req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)
ProcessProposal implements abci.ABCI.
func (*RemoteABCIClientV2) Query ¶
func (a *RemoteABCIClientV2) Query(ctx context.Context, req *abci.RequestQuery) (*abci.ResponseQuery, error)
Query implements abci.ABCI.
func (*RemoteABCIClientV2) VerifyVoteExtension ¶
func (a *RemoteABCIClientV2) VerifyVoteExtension(req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error)
VerifyVoteExtension implements abci.ABCI.
type Version ¶
type Version struct {
AppVersion uint64
ABCIVersion ABCIClientVersion
Appd *appd.Appd
PreHandlers []string // Commands to run before starting the app
StartArgs []string // Extra arguments to pass to the app
}
Version defines the configuration for remote apps.
func (Version) GetStartArgs ¶
GetStartArgs returns the appropriate args.
type Versions ¶
type Versions []Version
func NewVersions ¶
NewVersions returns a list of versions sorted by app version.
func (Versions) GetForAppVersion ¶
GetForAppVersion returns the version for a given appVersion. if the app version specified is lower than the minimum app version, return the lowest version.
func (Versions) ShouldUseLatestApp ¶
ShouldUseLatestApp returns true if there is no version found with the given appVersion.