Documentation ¶
Overview ¶
Package invoke provides the handlers for performing chaincode invocations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientContext ¶
type ClientContext struct { CryptoSuite core.CryptoSuite Discovery fab.DiscoveryService Selection fab.SelectionService Membership fab.ChannelMembership Transactor fab.Transactor EventService fab.EventService }
ClientContext contains context parameters for handler execution
type CommitTxHandler ¶
type CommitTxHandler struct {
// contains filtered or unexported fields
}
CommitTxHandler for committing transactions
func NewCommitHandler ¶
func NewCommitHandler(next ...Handler) *CommitTxHandler
NewCommitHandler returns a handler that commits transaction propsal responses
func (*CommitTxHandler) Handle ¶
func (c *CommitTxHandler) Handle(requestContext *RequestContext, clientContext *ClientContext)
Handle handles commit tx
type EndorsementHandler ¶
type EndorsementHandler struct {
// contains filtered or unexported fields
}
EndorsementHandler for handling endorse transactions
func NewEndorsementHandler ¶
func NewEndorsementHandler(next ...Handler) *EndorsementHandler
NewEndorsementHandler returns a handler that endorses a transaction proposal
func (*EndorsementHandler) Handle ¶
func (e *EndorsementHandler) Handle(requestContext *RequestContext, clientContext *ClientContext)
Handle for endorsing transactions
type EndorsementValidationHandler ¶
type EndorsementValidationHandler struct {
// contains filtered or unexported fields
}
EndorsementValidationHandler for transaction proposal response filtering
func NewEndorsementValidationHandler ¶
func NewEndorsementValidationHandler(next ...Handler) *EndorsementValidationHandler
NewEndorsementValidationHandler returns a handler that validates an endorsement
func (*EndorsementValidationHandler) Handle ¶
func (f *EndorsementValidationHandler) Handle(requestContext *RequestContext, clientContext *ClientContext)
Handle for Filtering proposal response
type Handler ¶
type Handler interface {
Handle(context *RequestContext, clientContext *ClientContext)
}
Handler for chaining transaction executions
func NewExecuteHandler ¶
NewExecuteHandler returns query handler with EndorseTxHandler, EndorsementValidationHandler & CommitTxHandler Chained
func NewQueryHandler ¶
NewQueryHandler returns query handler with EndorseTxHandler & EndorsementValidationHandler Chained
type Opts ¶
type Opts struct { Targets []fab.Peer // targets TargetFilter fab.TargetFilter Retry retry.Opts Timeouts map[core.TimeoutType]time.Duration ParentContext reqContext.Context //parent grpc context }
Opts allows the user to specify more advanced options
type ProposalProcessorHandler ¶
type ProposalProcessorHandler struct {
// contains filtered or unexported fields
}
ProposalProcessorHandler for selecting proposal processors
func NewProposalProcessorHandler ¶
func NewProposalProcessorHandler(next ...Handler) *ProposalProcessorHandler
NewProposalProcessorHandler returns a handler that selects proposal processors
func (*ProposalProcessorHandler) Handle ¶
func (h *ProposalProcessorHandler) Handle(requestContext *RequestContext, clientContext *ClientContext)
Handle selects proposal processors
type RequestContext ¶
type RequestContext struct { Request Request Opts Opts Response Response Error error RetryHandler retry.Handler Ctx reqContext.Context SelectionFilter selectopts.PeerFilter }
RequestContext contains request, opts, response parameters for handler execution
type Response ¶
type Response struct { Payload []byte TransactionID fab.TransactionID TxValidationCode pb.TxValidationCode Proposal *fab.TransactionProposal Responses []*fab.TransactionProposalResponse }
Response contains response parameters for query and execute transaction
type SignatureValidationHandler ¶
type SignatureValidationHandler struct {
// contains filtered or unexported fields
}
SignatureValidationHandler for transaction proposal response filtering
func NewSignatureValidationHandler ¶
func NewSignatureValidationHandler(next ...Handler) *SignatureValidationHandler
NewSignatureValidationHandler returns a handler that validates an endorsement
func (*SignatureValidationHandler) Handle ¶
func (f *SignatureValidationHandler) Handle(requestContext *RequestContext, clientContext *ClientContext)
Handle for Filtering proposal response