-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-8617] Deprecate Channel interface
Moves all the duplicated code to channel/deprecated.go and puts the deprecated build tag on the file. Note: This change was tested with: 'FABRIC_SDK_DEPRECATED_UNITTEST=true make unit-tests' Change-Id: I3fba72a7f6a59dd628098bdce13a2b559e853637 Signed-off-by: Divyank Katira <[email protected]>
- Loading branch information
Showing
18 changed files
with
660 additions
and
692 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
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
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
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
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
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,59 @@ | ||
// +build deprecated | ||
|
||
/* | ||
Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package fab | ||
|
||
import ( | ||
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/msp" | ||
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common" | ||
pb "github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/peer" | ||
) | ||
|
||
// Channel ... | ||
/** | ||
* Channel representing a Channel with which the client SDK interacts. | ||
* | ||
* The Channel object captures settings for a channel, which is created by | ||
* the orderers to isolate transactions delivery to peers participating on channel. | ||
* A channel must be initialized after it has been configured with the list of peers | ||
* and orderers. The initialization sends a get configuration block request to the | ||
* primary orderer to retrieve the configuration settings for this channel. | ||
*/ | ||
type Channel interface { | ||
Name() string | ||
ChannelConfig() (*common.ConfigEnvelope, error) | ||
|
||
SendInstantiateProposal(chaincodeName string, args [][]byte, chaincodePath string, chaincodeVersion string, chaincodePolicy *common.SignaturePolicyEnvelope, | ||
collConfig []*common.CollectionConfig, targets []ProposalProcessor) ([]*TransactionProposalResponse, TransactionID, error) | ||
SendUpgradeProposal(chaincodeName string, args [][]byte, chaincodePath string, chaincodeVersion string, chaincodePolicy *common.SignaturePolicyEnvelope, targets []ProposalProcessor) ([]*TransactionProposalResponse, TransactionID, error) | ||
|
||
// Network | ||
// Deprecated: getters/setters are deprecated from interface. | ||
AddPeer(peer Peer) error | ||
RemovePeer(peer Peer) | ||
Peers() []Peer | ||
AnchorPeers() []OrgAnchorPeer | ||
SetPrimaryPeer(peer Peer) error | ||
PrimaryPeer() Peer | ||
AddOrderer(orderer Orderer) error | ||
RemoveOrderer(orderer Orderer) | ||
Orderers() []Orderer | ||
SetMSPManager(mspManager msp.MSPManager) | ||
MSPManager() msp.MSPManager | ||
OrganizationUnits() ([]string, error) | ||
|
||
// Query | ||
QueryInfo() (*common.BlockchainInfo, error) | ||
QueryBlock(blockNumber int) (*common.Block, error) | ||
QueryBlockByHash(blockHash []byte) (*common.Block, error) | ||
QueryTransaction(transactionID TransactionID) (*pb.ProcessedTransaction, error) | ||
QueryInstantiatedChaincodes() (*pb.ChaincodeQueryResponse, error) | ||
QueryByChaincode(request ChaincodeInvokeRequest) ([][]byte, error) | ||
QueryBySystemChaincode(request ChaincodeInvokeRequest) ([][]byte, error) | ||
QueryConfigBlock(targets []ProposalProcessor, minResponses int) (*common.ConfigEnvelope, error) | ||
} |
Oops, something went wrong.