Documentation ¶
Overview ¶
Package resource provides access to fabric network resource management, typically using system channel queries.
Index ¶
- type Resource
- func (c *Resource) CreateChannel(request fab.CreateChannelRequest) (fab.TransactionID, error)
- func (c *Resource) ExtractChannelConfig(configEnvelope []byte) ([]byte, error)
- func (c *Resource) GenesisBlockFromOrderer(channelName string, orderer fab.Orderer) (*common.Block, error)
- func (c *Resource) InstallChaincode(req fab.InstallChaincodeRequest) ([]*fab.TransactionProposalResponse, string, error)
- func (c *Resource) JoinChannel(request fab.JoinChannelRequest) error
- func (c *Resource) QueryChannels(peer fab.ProposalProcessor) (*pb.ChannelQueryResponse, error)
- func (c *Resource) QueryInstalledChaincodes(peer fab.ProposalProcessor) (*pb.ChaincodeQueryResponse, error)
- func (c *Resource) SignChannelConfig(config []byte, signer fab.IdentityContext) (*common.ConfigSignature, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource is a client that provides access to fabric network resource management.
func (*Resource) CreateChannel ¶
func (c *Resource) CreateChannel(request fab.CreateChannelRequest) (fab.TransactionID, error)
CreateChannel calls the orderer to start building the new channel.
func (*Resource) ExtractChannelConfig ¶
ExtractChannelConfig extracts the protobuf 'ConfigUpdate' object out of the 'ConfigEnvelope'.
func (*Resource) GenesisBlockFromOrderer ¶
func (c *Resource) GenesisBlockFromOrderer(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 (*Resource) InstallChaincode ¶
func (c *Resource) InstallChaincode(req fab.InstallChaincodeRequest) ([]*fab.TransactionProposalResponse, string, error)
InstallChaincode sends an install proposal to one or more endorsing peers.
func (*Resource) JoinChannel ¶
func (c *Resource) JoinChannel(request fab.JoinChannelRequest) error
JoinChannel sends a join channel proposal to the target peer.
TODO extract targets from request into parameter.
func (*Resource) QueryChannels ¶
func (c *Resource) QueryChannels(peer fab.ProposalProcessor) (*pb.ChannelQueryResponse, error)
QueryChannels queries the names of all the channels that a peer has joined.
func (*Resource) QueryInstalledChaincodes ¶
func (c *Resource) QueryInstalledChaincodes(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 (*Resource) SignChannelConfig ¶
func (c *Resource) SignChannelConfig(config []byte, signer fab.IdentityContext) (*common.ConfigSignature, error)
SignChannelConfig signs a configuration.