-
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-7948] Removing *WithOpts functions in resgmtclient
Change-Id: I1a10c4c961f3068b00c85afed97588a5045eb1ce Signed-off-by: Sudesh Shetty <[email protected]>
- Loading branch information
1 parent
4345a28
commit b0efb7e
Showing
4 changed files
with
155 additions
and
188 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,37 @@ | ||
/* | ||
Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package resmgmtclient | ||
|
||
import ( | ||
"time" | ||
|
||
fab "github.com/hyperledger/fabric-sdk-go/api/apifabclient" | ||
) | ||
|
||
//WithTargets encapsulates fab.Peer targets to resmgmtclient Option | ||
func WithTargets(targets ...fab.Peer) Option { | ||
return func(opts *Opts) error { | ||
opts.Targets = targets | ||
return nil | ||
} | ||
} | ||
|
||
//WithTargetFilter encapsulates resmgmtclient TargetFilter targets to resmgmtclient Option | ||
func WithTargetFilter(targetFilter TargetFilter) Option { | ||
return func(opts *Opts) error { | ||
opts.TargetFilter = targetFilter | ||
return nil | ||
} | ||
} | ||
|
||
//WithTimeout encapsulates time.Duration to resmgmtclient Option | ||
func WithTimeout(timeout time.Duration) Option { | ||
return func(opts *Opts) error { | ||
opts.Timeout = timeout | ||
return nil | ||
} | ||
} |
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.