Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstallCCRequest ¶
InstallCCRequest contains install chaincode request parameters
type InstallCCResponse ¶
InstallCCResponse contains install chaincode response status
type InstantiateCCRequest ¶
type InstantiateCCRequest struct { Name string Path string Version string Args [][]byte Policy *common.SignaturePolicyEnvelope CollConfig []*common.CollectionConfig }
InstantiateCCRequest contains instantiate chaincode request parameters
type Option ¶
Option func for each Opts argument
func WithTargetFilter ¶
func WithTargetFilter(targetFilter TargetFilter) Option
WithTargetFilter encapsulates resmgmtclient TargetFilter targets to resmgmtclient Option
func WithTargets ¶
WithTargets encapsulates fab.Peer targets to resmgmtclient Option
func WithTimeout ¶
WithTimeout encapsulates time.Duration to resmgmtclient Option
type Opts ¶
type Opts struct { Targets []fab.Peer // target peers TargetFilter TargetFilter // target filter Timeout time.Duration //timeout options for instantiate and upgrade CC }
Opts contains options for operations performed by ResourceMgmtClient
type ResourceMgmtClient ¶
type ResourceMgmtClient interface { // InstallCC installs chaincode with optional custom options (specific peers, filtered peers) InstallCC(req InstallCCRequest, options ...Option) ([]InstallCCResponse, error) // InstantiateCC instantiates chaincode with optional custom options (specific peers, filtered peers, timeout) InstantiateCC(channelID string, req InstantiateCCRequest, options ...Option) error // UpgradeCC upgrades chaincode with optional custom options (specific peers, filtered peers, timeout) UpgradeCC(channelID string, req UpgradeCCRequest, options ...Option) error // JoinChannel allows for peers to join existing channel with optional custom options (specific peers, filtered peers) JoinChannel(channelID string, options ...Option) error }
ResourceMgmtClient is responsible for managing resources: peers joining channels, and installing and instantiating chaincodes(TODO).
type TargetFilter ¶
type TargetFilter interface { // Accept returns true if peer should be included in the list of target peers Accept(peer fab.Peer) bool }
TargetFilter allows for filtering target peers
type UpgradeCCRequest ¶
type UpgradeCCRequest struct { Name string Path string Version string Args [][]byte Policy *common.SignaturePolicyEnvelope CollConfig []*common.CollectionConfig }
UpgradeCCRequest contains upgrade chaincode request parameters