-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-9649] Peer CLI invoke wait for event with txid
This CR adds the ability to connect the CLI to the deliver filtered service and wait for an event containing the txid for a given chaincode invocation. Change-Id: I8d0694e621467a544fb4c8cda7b880096e677f25 Signed-off-by: Will Lahti <[email protected]>
- Loading branch information
Showing
14 changed files
with
1,293 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
Copyright IBM Corp. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package api | ||
|
||
import ( | ||
"context" | ||
|
||
pcommon "github.com/hyperledger/fabric/protos/common" | ||
pb "github.com/hyperledger/fabric/protos/peer" | ||
"google.golang.org/grpc" | ||
) | ||
|
||
//go:generate counterfeiter -o ../mock/deliverclient.go -fake-name DeliverClient . DeliverClient | ||
|
||
// DeliverClient defines the interface for a peer's deliver service | ||
type DeliverClient interface { | ||
Deliver(ctx context.Context, opts ...grpc.CallOption) (Deliver, error) | ||
DeliverFiltered(ctx context.Context, opts ...grpc.CallOption) (Deliver, error) | ||
} | ||
|
||
//go:generate counterfeiter -o ../mock/deliver.go -fake-name Deliver . Deliver | ||
|
||
// Deliver defines the interface for delivering blocks | ||
type Deliver interface { | ||
Send(*pcommon.Envelope) error | ||
Recv() (*pb.DeliverResponse, error) | ||
CloseSend() error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.