resource

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

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

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 New

func New(ctx fab.Context) *Resource

New returns a Client instance with the SDK context.

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

func (c *Resource) ExtractChannelConfig(configEnvelope []byte) ([]byte, error)

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

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.

Jump to

Keyboard shortcuts

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