-
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-7047] Resource Mgmt Client - Join Channel
Change-Id: Ied8c821efa9631e450ebb911945404f238d424fe Signed-off-by: Sandra Vrtikapa <[email protected]>
- Loading branch information
Showing
27 changed files
with
1,098 additions
and
88 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,31 @@ | ||
/* | ||
Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package resmgmt | ||
|
||
import fab "github.com/hyperledger/fabric-sdk-go/api/apifabclient" | ||
|
||
// TargetFilter allows for filtering target peers | ||
type TargetFilter interface { | ||
// Accept returns true if peer should be included in the list of target peers | ||
Accept(peer fab.Peer) bool | ||
} | ||
|
||
// JoinChannelOpts contains options for peers joining channel | ||
type JoinChannelOpts struct { | ||
Targets []fab.Peer // target peers | ||
TargetFilter TargetFilter // peer filter | ||
} | ||
|
||
// ResourceMgmtClient is responsible for managing resources: peers joining channels, and installing and instantiating chaincodes(TODO). | ||
type ResourceMgmtClient interface { | ||
|
||
// JoinChannel allows for peers to join existing channel | ||
JoinChannel(channelID string) error | ||
|
||
//JoinChannelWithOpts allows for customizing set of peers about to join the channel (specific peers/filtered peers) | ||
JoinChannelWithOpts(channelID string, opts JoinChannelOpts) 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
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
Oops, something went wrong.