Documentation ¶
Overview ¶
Package resource provides access to fabric network resource management, typically using system channel queries.
Package resource provides access to fabric network resource management, typically using system channel queries.
Index ¶
- func CreateChaincodeInstallProposal(txh fab.TransactionHeader, request ChaincodeInstallRequest) (*fab.TransactionProposal, error)
- func CreateChannel(reqCtx reqContext.Context, request api.CreateChannelRequest) (fab.TransactionID, error)
- func CreateConfigEnvelope(data []byte) (*common.ConfigEnvelope, error)
- func CreateConfigSignature(ctx context.Client, config []byte) (*common.ConfigSignature, error)
- func ExtractChannelConfig(configEnvelope []byte) ([]byte, error)
- func GenesisBlockFromOrderer(reqCtx reqContext.Context, channelName string, orderer fab.Orderer) (*common.Block, error)
- func GetLastConfigFromBlock(block *common.Block) (*common.LastConfig, error)
- func InstallChaincode(reqCtx reqContext.Context, req api.InstallChaincodeRequest, ...) ([]*fab.TransactionProposalResponse, fab.TransactionID, error)
- func JoinChannel(reqCtx reqContext.Context, request api.JoinChannelRequest, ...) error
- func LastConfigFromOrderer(reqCtx reqContext.Context, channelName string, orderer fab.Orderer) (*common.ConfigEnvelope, error)
- func QueryChannels(reqCtx reqContext.Context, peer fab.ProposalProcessor) (*pb.ChannelQueryResponse, error)
- func QueryInstalledChaincodes(reqCtx reqContext.Context, peer fab.ProposalProcessor) (*pb.ChaincodeQueryResponse, error)
- func SignChannelConfig(ctx context.Client, config []byte, signer msp.SigningIdentity) (*common.ConfigSignature, error)
- type ChaincodeInstallRequest
- type ChaincodePackage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChaincodeInstallProposal ¶
func CreateChaincodeInstallProposal(txh fab.TransactionHeader, request ChaincodeInstallRequest) (*fab.TransactionProposal, error)
CreateChaincodeInstallProposal creates an install chaincode proposal.
func CreateChannel ¶
func CreateChannel(reqCtx reqContext.Context, request api.CreateChannelRequest) (fab.TransactionID, error)
CreateChannel calls the orderer to start building the new channel.
func CreateConfigEnvelope ¶
func CreateConfigEnvelope(data []byte) (*common.ConfigEnvelope, error)
CreateConfigEnvelope creates configuration envelope proto
func CreateConfigSignature ¶
CreateConfigSignature creates a ConfigSignature for the current context.
func ExtractChannelConfig ¶
ExtractChannelConfig extracts the protobuf 'ConfigUpdate' object out of the 'ConfigEnvelope'.
func GenesisBlockFromOrderer ¶
func GenesisBlockFromOrderer(reqCtx reqContext.Context, channelName string, orderer fab.Orderer) (*common.Block, error)
GenesisBlockFromOrderer returns the genesis block from the defined orderer that may be used in a join request
func GetLastConfigFromBlock ¶
func GetLastConfigFromBlock(block *common.Block) (*common.LastConfig, error)
GetLastConfigFromBlock returns the LastConfig data from the given block
func InstallChaincode ¶
func InstallChaincode(reqCtx reqContext.Context, req api.InstallChaincodeRequest, targets []fab.ProposalProcessor) ([]*fab.TransactionProposalResponse, fab.TransactionID, error)
InstallChaincode sends an install proposal to one or more endorsing peers.
func JoinChannel ¶
func JoinChannel(reqCtx reqContext.Context, request api.JoinChannelRequest, targets []fab.ProposalProcessor) error
JoinChannel sends a join channel proposal to the target peer.
TODO extract targets from request into parameter.
func LastConfigFromOrderer ¶
func LastConfigFromOrderer(reqCtx reqContext.Context, channelName string, orderer fab.Orderer) (*common.ConfigEnvelope, error)
LastConfigFromOrderer fetches the current configuration block for the specified channel from the given orderer
func QueryChannels ¶
func QueryChannels(reqCtx reqContext.Context, peer fab.ProposalProcessor) (*pb.ChannelQueryResponse, error)
QueryChannels queries the names of all the channels that a peer has joined.
func QueryInstalledChaincodes ¶
func QueryInstalledChaincodes(reqCtx reqContext.Context, peer fab.ProposalProcessor) (*pb.ChaincodeQueryResponse, error)
QueryInstalledChaincodes queries the installed chaincodes on a peer. Returns the details of all chaincodes installed on a peer.
func SignChannelConfig ¶
func SignChannelConfig(ctx context.Client, config []byte, signer msp.SigningIdentity) (*common.ConfigSignature, error)
SignChannelConfig signs a configuration.
Types ¶
type ChaincodeInstallRequest ¶
type ChaincodeInstallRequest struct { Name string Path string Version string Package *ChaincodePackage }
ChaincodeInstallRequest requests chaincode installation on the network
type ChaincodePackage ¶
type ChaincodePackage struct { Type pb.ChaincodeSpec_Type Code []byte }
ChaincodePackage contains package type and bytes required to create CDS