Documentation
¶
Overview ¶
Package server is used to start a new ABCI server.
It contains two server implementation:
- gRPC server
- socket server
Index ¶
- func NewGRPCServer(protoAddr string) service.Service
- func NewServer(protoAddr, transport string, app cmtabci.Application) (service.Service, error)
- func NewSocketServer(protoAddr string, app cmtabci.Application) service.Service
- 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 GRPCServer
- type SocketServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGRPCServer ¶
NewGRPCServer returns a new gRPC ABCI server (disabled)
func NewSocketServer ¶
func NewSocketServer(protoAddr string, app cmtabci.Application) service.Service
Types ¶
type ABCIAdapter ¶
type ABCIAdapter struct {
// contains filtered or unexported fields
}
ABCIAdapter converts a local ABCI application to a CometBFT ABCI application
func NewABCIAdapter ¶
func NewABCIAdapter(app types.Application) *ABCIAdapter
NewABCIAdapter creates a new adapter that wraps a local ABCI application
func (*ABCIAdapter) ApplySnapshotChunk ¶
func (a *ABCIAdapter) ApplySnapshotChunk(ctx context.Context, req *cmtabci.RequestApplySnapshotChunk) (*cmtabci.ResponseApplySnapshotChunk, error)
ApplySnapshotChunk implements cmtabci.Application
func (*ABCIAdapter) CheckTx ¶
func (a *ABCIAdapter) CheckTx(ctx context.Context, req *cmtabci.RequestCheckTx) (*cmtabci.ResponseCheckTx, error)
CheckTx implements cmtabci.Application
func (*ABCIAdapter) Commit ¶
func (a *ABCIAdapter) Commit(ctx context.Context, req *cmtabci.RequestCommit) (*cmtabci.ResponseCommit, error)
Commit implements cmtabci.Application
func (*ABCIAdapter) Echo ¶
func (a *ABCIAdapter) Echo(ctx context.Context, req *cmtabci.RequestEcho) (*cmtabci.ResponseEcho, error)
Echo implements cmtabci.Application
func (*ABCIAdapter) ExtendVote ¶
func (a *ABCIAdapter) ExtendVote(ctx context.Context, req *cmtabci.RequestExtendVote) (*cmtabci.ResponseExtendVote, error)
ExtendVote implements cmtabci.Application
func (*ABCIAdapter) FinalizeBlock ¶
func (a *ABCIAdapter) FinalizeBlock(ctx context.Context, req *cmtabci.RequestFinalizeBlock) (*cmtabci.ResponseFinalizeBlock, error)
FinalizeBlock implements cmtabci.Application
func (*ABCIAdapter) Flush ¶
func (a *ABCIAdapter) Flush(ctx context.Context, req *cmtabci.RequestFlush) (*cmtabci.ResponseFlush, error)
Flush implements cmtabci.Application
func (*ABCIAdapter) Info ¶
func (a *ABCIAdapter) Info(ctx context.Context, req *cmtabci.RequestInfo) (*cmtabci.ResponseInfo, error)
Info implements cmtabci.Application
func (*ABCIAdapter) InitChain ¶
func (a *ABCIAdapter) InitChain(ctx context.Context, req *cmtabci.RequestInitChain) (*cmtabci.ResponseInitChain, error)
InitChain implements cmtabci.Application
func (*ABCIAdapter) ListSnapshots ¶
func (a *ABCIAdapter) ListSnapshots(ctx context.Context, req *cmtabci.RequestListSnapshots) (*cmtabci.ResponseListSnapshots, error)
ListSnapshots implements cmtabci.Application
func (*ABCIAdapter) LoadSnapshotChunk ¶
func (a *ABCIAdapter) LoadSnapshotChunk(ctx context.Context, req *cmtabci.RequestLoadSnapshotChunk) (*cmtabci.ResponseLoadSnapshotChunk, error)
LoadSnapshotChunk implements cmtabci.Application
func (*ABCIAdapter) OfferSnapshot ¶
func (a *ABCIAdapter) OfferSnapshot(ctx context.Context, req *cmtabci.RequestOfferSnapshot) (*cmtabci.ResponseOfferSnapshot, error)
OfferSnapshot implements cmtabci.Application
func (*ABCIAdapter) PrepareProposal ¶
func (a *ABCIAdapter) PrepareProposal(ctx context.Context, req *cmtabci.RequestPrepareProposal) (*cmtabci.ResponsePrepareProposal, error)
PrepareProposal implements cmtabci.Application
func (*ABCIAdapter) ProcessProposal ¶
func (a *ABCIAdapter) ProcessProposal(ctx context.Context, req *cmtabci.RequestProcessProposal) (*cmtabci.ResponseProcessProposal, error)
ProcessProposal implements cmtabci.Application
func (*ABCIAdapter) Query ¶
func (a *ABCIAdapter) Query(ctx context.Context, req *cmtabci.RequestQuery) (*cmtabci.ResponseQuery, error)
Query implements cmtabci.Application
func (*ABCIAdapter) VerifyVoteExtension ¶
func (a *ABCIAdapter) VerifyVoteExtension(ctx context.Context, req *cmtabci.RequestVerifyVoteExtension) (*cmtabci.ResponseVerifyVoteExtension, error)
VerifyVoteExtension implements cmtabci.Application
type GRPCServer ¶
type GRPCServer struct {
service.BaseService
// contains filtered or unexported fields
}
type SocketServer ¶
type SocketServer struct {
service.BaseService
// contains filtered or unexported fields
}
func (*SocketServer) OnStart ¶
func (s *SocketServer) OnStart() error
func (*SocketServer) OnStop ¶
func (s *SocketServer) OnStop()
func (*SocketServer) SetLogger ¶
func (s *SocketServer) SetLogger(l tmlog.Logger)