chaincode

package
v0.0.0-...-f7d5a40 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PEERS_IN_CHANNEL    = "channels.%s.peers"   // defined in sdk-go config yaml file
	CLIENT_ORGANIZATION = "client.organization" // defined in fabric-sdk-go config yaml

	// cli parameters
	CC_NAME_PREFIX            = "chaincodeNamePrefix"
	CHAN_NAME_PREFIX          = "channelNamePrefix"
	PREFIX_OFFSET             = "prefixOffset"
	CHAN_NAME_LIST            = "channelNameList"
	CC_VERSION                = "chaincodeVersion"
	CC_PATH                   = "path"
	PEERS                     = "peers"
	CHANNEL_NAME              = "channelName"
	CC_NAME                   = "chaincodeName"
	QUERY_ONLY                = "queryOnly"
	CC_PARAMS                 = "chaincodeParams"
	CC_STATIC_TRANSIENTMAP    = "staticTransientMap"
	CC_DYNAMIC_TRANSIENTMAP_K = "dynamicTransientMapKs"
	CC_DYNAMIC_TRANSIENTMAP_V = "dynamicTransientMapVs"
	THREADS                   = "threads"
	POLICY_STR                = "policyStr"
	COLLECTION_CONFIG_PATH    = "collectionsConfigPath"
	SERVICE_DISCOVERY         = "serviceDiscovery"
	FABRIC_VERSION            = "fabricVersion"
	PROMETHEUS_TARGET_URL     = "prometheusTargetUrl"

	// keys in connection profile
	CP_PEERS = "peers"
	CP_ORGS  = "organizations"
)
View Source
const (
	CC_INVOKE      = "chaincode.invoke"
	CC_INVOKE_SENT = "chaincode.invoke.sent"
	CC_INVOKE_FAIL = "chaincode.invoke.fail"
)
View Source
const CC_INSTALL = "chaincode.install"
View Source
const CC_INSTANTIATE = "chaincode.instantiate"

Variables

This section is empty.

Functions

func Cmd

func Cmd() *cobra.Command

Cmd returns the cobra command for Chaincode

Types

type Chaincode

type Chaincode struct {
	*hfrdcommon.Base

	CollectionsConfig []*cb.CollectionConfig // Collections config used to instantiate pvt(private data) chaincode
	// contains filtered or unexported fields
}

func (*Chaincode) InstallChaincode

func (cc *Chaincode) InstallChaincode(name, version, path, peer, org string) error

name: chaincode name version: chaincode version path: chaincode path: relative to GOPATH environment variable peer: on which peer to install the chaincode org: the Org MSP id to which the peer belongs to

func (*Chaincode) InstantiateChaincode

func (cc *Chaincode) InstantiateChaincode(name, version, path, org, channel string, peers ...string) error

func (*Chaincode) InvokeChaincode

func (cc *Chaincode) InvokeChaincode() error

type DynamicDiscoveryProviderFactory

type DynamicDiscoveryProviderFactory struct {
	defsvc.ProviderFactory
}

DynamicDiscoveryProviderFactory is configured with dynamic (endorser) selection provider

func (*DynamicDiscoveryProviderFactory) CreateChannelProvider

func (f *DynamicDiscoveryProviderFactory) CreateChannelProvider(config fab.EndpointConfig, options ...options.Opt) (fab.ChannelProvider, error)

CreateChannelProvider returns a new default implementation of channel provider

func (*DynamicDiscoveryProviderFactory) CreateLocalDiscoveryProvider

func (f *DynamicDiscoveryProviderFactory) CreateLocalDiscoveryProvider(config fab.EndpointConfig) (fab.LocalDiscoveryProvider, error)

CreateLocalDiscoveryProvider returns a new local dynamic discovery provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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