Documentation ¶
Index ¶
- type ACLChecker
- type CommitFinder
- type Discovery
- type EndorserServerAdapter
- type Server
- func (gs *Server) ChaincodeEvents(signedRequest *gp.SignedChaincodeEventsRequest, ...) error
- func (gs *Server) CommitStatus(ctx context.Context, signedRequest *gp.SignedCommitStatusRequest) (*gp.CommitStatusResponse, error)
- func (gs *Server) Endorse(ctx context.Context, request *gp.EndorseRequest) (*gp.EndorseResponse, error)
- func (gs *Server) Evaluate(ctx context.Context, request *gp.EvaluateRequest) (*gp.EvaluateResponse, error)
- func (gs *Server) Submit(ctx context.Context, request *gp.SubmitRequest) (*gp.SubmitResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACLChecker ¶
type CommitFinder ¶
type Discovery ¶
type Discovery interface { Config(channel string) (*dp.ConfigResult, error) IdentityInfo() gossipapi.PeerIdentitySet PeersForEndorsement(channel gossipcommon.ChannelID, interest *peer.ChaincodeInterest) (*dp.EndorsementDescriptor, error) PeersOfChannel(gossipcommon.ChannelID) gossipdiscovery.Members }
type EndorserServerAdapter ¶
type EndorserServerAdapter struct {
Server peerproto.EndorserServer
}
func (*EndorserServerAdapter) ProcessProposal ¶
func (e *EndorserServerAdapter) ProcessProposal(ctx context.Context, req *peerproto.SignedProposal, _ ...grpc.CallOption) (*peerproto.ProposalResponse, error)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the GRPC server for the Gateway.
func CreateServer ¶
func CreateServer( localEndorser peerproto.EndorserServer, discovery Discovery, peerInstance *peer.Peer, secureOptions *comm.SecureOptions, policy ACLChecker, localMSPID string, options config.Options, systemChaincodes scc.BuiltinSCCs, ) *Server
CreateServer creates an embedded instance of the Gateway.
func (*Server) ChaincodeEvents ¶
func (gs *Server) ChaincodeEvents(signedRequest *gp.SignedChaincodeEventsRequest, stream gp.Gateway_ChaincodeEventsServer) error
ChaincodeEvents supplies a stream of responses, each containing all the events emitted by the requested chaincode for a specific block. The streamed responses are ordered by ascending block number. Responses are only returned for blocks that contain the requested events, while blocks not containing any of the requested events are skipped. The events within each response message are presented in the same order that the transactions that emitted them appear within the block.
func (*Server) CommitStatus ¶
func (gs *Server) CommitStatus(ctx context.Context, signedRequest *gp.SignedCommitStatusRequest) (*gp.CommitStatusResponse, error)
CommitStatus returns the validation code for a specific transaction on a specific channel. If the transaction is already committed, the status will be returned immediately; otherwise this call will block and return only when the transaction commits or the context is cancelled.
If the transaction commit status cannot be returned, for example if the specified channel does not exist, a FailedPrecondition error will be returned.
func (*Server) Endorse ¶
func (gs *Server) Endorse(ctx context.Context, request *gp.EndorseRequest) (*gp.EndorseResponse, error)
Endorse will collect endorsements by invoking the transaction function specified in the SignedProposal against sufficient Peers to satisfy the endorsement policy.
func (*Server) Evaluate ¶
func (gs *Server) Evaluate(ctx context.Context, request *gp.EvaluateRequest) (*gp.EvaluateResponse, error)
Evaluate will invoke the transaction function as specified in the SignedProposal
func (*Server) Submit ¶
func (gs *Server) Submit(ctx context.Context, request *gp.SubmitRequest) (*gp.SubmitResponse, error)
Submit will send the signed transaction to the ordering service. The response indicates whether the transaction was successfully received by the orderer. This does not imply successful commit of the transaction, only that is has been delivered to the orderer.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package commit provides an implementation for finding transaction commit status that is specific to the Gateway embedded within a peer.
|
Package commit provides an implementation for finding transaction commit status that is specific to the Gateway embedded within a peer. |
mocks
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
mocks
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
mocks
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |