resource

package
v1.0.0-alpha3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

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

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

func CreateConfigSignature(ctx context.Client, config []byte) (*common.ConfigSignature, error)

CreateConfigSignature creates a ConfigSignature for the current context.

func ExtractChannelConfig

func ExtractChannelConfig(configEnvelope []byte) ([]byte, error)

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL