Versions in this module Expand all Collapse all v1 v1.4.6 Feb 25, 2020 Changes in this version + const DevModeUserRunsChaincode + const HistoryQueryExecutorKey + const TLSClientCertPath + const TLSClientKeyPath + const TLSClientRootCertPath + const TXSimulatorKey + func IsDevMode() bool + func NewTxKey(channelID, txID string) string + func ParseName(ccName string) *sysccprovider.ChaincodeInstance + type ACLProvider interface + CheckACL func(resName string, channelID string, idinfo interface{}) error + type ActiveTransactions struct + func NewActiveTransactions() *ActiveTransactions + func (a *ActiveTransactions) Add(channelID, txID string) bool + func (a *ActiveTransactions) Remove(channelID, txID string) + type ApplicationConfigRetriever interface + GetApplicationConfig func(cid string) (channelconfig.Application, bool) + type CCProviderImpl struct + func NewProvider(cs *ChaincodeSupport) *CCProviderImpl + func (c *CCProviderImpl) Execute(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*pb.Response, *pb.ChaincodeEvent, error) + func (c *CCProviderImpl) ExecuteLegacyInit(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*pb.Response, *pb.ChaincodeEvent, error) + func (c *CCProviderImpl) Stop(ccci *ccprovider.ChaincodeContainerInfo) error + type CertGenerator interface + Generate func(ccName string) (*accesscontrol.CertAndPrivKeyPair, error) + type ChaincodeDefinitionGetter interface + ChaincodeDefinition func(chaincodeName string, txSim ledger.QueryExecutor) (ccprovider.ChaincodeDefinition, error) + type ChaincodeSupport struct + ACLProvider ACLProvider + ExecuteTimeout time.Duration + HandlerMetrics *HandlerMetrics + HandlerRegistry *HandlerRegistry + Keepalive time.Duration + LaunchMetrics *LaunchMetrics + Launcher Launcher + Lifecycle Lifecycle + Runtime Runtime + SystemCCProvider sysccprovider.SystemChaincodeProvider + UserRunsCC bool + func NewChaincodeSupport(config *Config, peerAddress string, userRunsCC bool, caCert []byte, ...) *ChaincodeSupport + func (cs *ChaincodeSupport) Execute(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*pb.Response, *pb.ChaincodeEvent, error) + func (cs *ChaincodeSupport) ExecuteLegacyInit(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*pb.Response, *pb.ChaincodeEvent, error) + func (cs *ChaincodeSupport) HandleChaincodeStream(stream ccintf.ChaincodeStream) error + func (cs *ChaincodeSupport) Invoke(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*pb.ChaincodeMessage, error) + func (cs *ChaincodeSupport) InvokeInit(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*pb.ChaincodeMessage, error) + func (cs *ChaincodeSupport) Launch(chainID, chaincodeName, chaincodeVersion string, qe ledger.QueryExecutor) (*Handler, error) + func (cs *ChaincodeSupport) LaunchInit(ccci *ccprovider.ChaincodeContainerInfo) error + func (cs *ChaincodeSupport) Register(stream pb.ChaincodeSupport_RegisterServer) error + func (cs *ChaincodeSupport) Stop(ccci *ccprovider.ChaincodeContainerInfo) error + type CheckInstantiationPolicyFunc func(name, version string, cd *ccprovider.ChaincodeData) error + func (c CheckInstantiationPolicyFunc) CheckInstantiationPolicy(name, version string, cd *ccprovider.ChaincodeData) error + type Config struct + ExecuteTimeout time.Duration + Keepalive time.Duration + LogFormat string + LogLevel string + ShimLogLevel string + StartupTimeout time.Duration + TLSEnabled bool + func GlobalConfig() *Config + type ContainerRuntime struct + CACert []byte + CertGenerator CertGenerator + CommonEnv []string + PeerAddress string + PlatformRegistry *platforms.Registry + Processor Processor + func (c *ContainerRuntime) LaunchConfig(cname string, ccType string) (*LaunchConfig, error) + func (c *ContainerRuntime) Start(ccci *ccprovider.ChaincodeContainerInfo, codePackage []byte) error + func (c *ContainerRuntime) Stop(ccci *ccprovider.ChaincodeContainerInfo) error + func (c *ContainerRuntime) Wait(ccci *ccprovider.ChaincodeContainerInfo) (int, error) + type ContextRegistry interface + Close func() + Create func(txParams *ccprovider.TransactionParams) (*TransactionContext, error) + Delete func(chainID, txID string) + Get func(chainID, txID string) *TransactionContext + type Handler struct + ACLProvider ACLProvider + ActiveTransactions TransactionRegistry + AppConfig ApplicationConfigRetriever + DefinitionGetter ChaincodeDefinitionGetter + InstantiationPolicyChecker InstantiationPolicyChecker + Invoker Invoker + Keepalive time.Duration + LedgerGetter LedgerGetter + Metrics *HandlerMetrics + QueryResponseBuilder QueryResponseBuilder + Registry Registry + SystemCCProvider SystemCCProvider + SystemCCVersion string + TXContexts ContextRegistry + UUIDGenerator UUIDGenerator + func (h *Handler) ChaincodeName() string + func (h *Handler) Close() + func (h *Handler) Execute(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleDelState(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleGetHistoryForKey(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleGetPrivateDataHash(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleGetQueryResult(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleGetState(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleGetStateByRange(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleGetStateMetadata(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleInvokeChaincode(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandlePutState(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandlePutStateMetadata(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleQueryStateClose(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleQueryStateNext(msg *pb.ChaincodeMessage, txContext *TransactionContext) (*pb.ChaincodeMessage, error) + func (h *Handler) HandleRegister(msg *pb.ChaincodeMessage) + func (h *Handler) HandleTransaction(msg *pb.ChaincodeMessage, delegate handleFunc) + func (h *Handler) Notify(msg *pb.ChaincodeMessage) + func (h *Handler) ProcessStream(stream ccintf.ChaincodeStream) error + func (h *Handler) State() State + type HandlerMetrics struct + ExecuteTimeouts metrics.Counter + ShimRequestDuration metrics.Histogram + ShimRequestsCompleted metrics.Counter + ShimRequestsReceived metrics.Counter + func NewHandlerMetrics(p metrics.Provider) *HandlerMetrics + type HandlerRegistry struct + func NewHandlerRegistry(allowUnsolicitedRegistration bool) *HandlerRegistry + func (r *HandlerRegistry) Deregister(cname string) error + func (r *HandlerRegistry) Failed(cname string, err error) + func (r *HandlerRegistry) Handler(cname string) *Handler + func (r *HandlerRegistry) Launching(cname string) (*LaunchState, bool) + func (r *HandlerRegistry) Ready(cname string) + func (r *HandlerRegistry) Register(h *Handler) error + type InstantiationPolicyChecker interface + CheckInstantiationPolicy func(name, version string, cd *ccprovider.ChaincodeData) error + type Invoker interface + Invoke func(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*pb.ChaincodeMessage, error) + type LaunchConfig struct + Args []string + Envs []string + Files map[string][]byte + func (lc *LaunchConfig) String() string + type LaunchMetrics struct + LaunchDuration metrics.Histogram + LaunchFailures metrics.Counter + LaunchTimeouts metrics.Counter + func NewLaunchMetrics(p metrics.Provider) *LaunchMetrics + type LaunchRegistry interface + Deregister func(cname string) error + Launching func(cname string) (launchState *LaunchState, started bool) + type LaunchState struct + func NewLaunchState() *LaunchState + func (l *LaunchState) Done() <-chan struct{} + func (l *LaunchState) Err() error + func (l *LaunchState) Notify(err error) + type Launcher interface + Launch func(ccci *ccprovider.ChaincodeContainerInfo) error + type LedgerGetter interface + GetLedger func(cid string) ledger.PeerLedger + type Lifecycle interface + ChaincodeContainerInfo func(chaincodeName string, qe ledger.QueryExecutor) (*ccprovider.ChaincodeContainerInfo, error) + ChaincodeDefinition func(chaincodeName string, qe ledger.QueryExecutor) (ccprovider.ChaincodeDefinition, error) + type MessageHandler interface + Handle func(*pb.ChaincodeMessage, *TransactionContext) (*pb.ChaincodeMessage, error) + type PackageProvider interface + GetChaincodeCodePackage func(ccname string, ccversion string) ([]byte, error) + type PendingQueryResult struct + func (p *PendingQueryResult) Add(queryResult commonledger.QueryResult) error + func (p *PendingQueryResult) Cut() []*pb.QueryResultBytes + func (p *PendingQueryResult) Size() int + type Processor interface + Process func(vmtype string, req container.VMCReq) error + type QueryResponseBuilder interface + BuildQueryResponse func(txContext *TransactionContext, iter commonledger.ResultsIterator, ...) (*pb.QueryResponse, error) + type QueryResponseGenerator struct + MaxResultLimit int + func (q *QueryResponseGenerator) BuildQueryResponse(txContext *TransactionContext, iter commonledger.ResultsIterator, ...) (*pb.QueryResponse, error) + type Registry interface + Deregister func(cname string) error + Failed func(cname string, err error) + Ready func(cname string) + Register func(*Handler) error + type Runtime interface + Start func(ccci *ccprovider.ChaincodeContainerInfo, codePackage []byte) error + Stop func(ccci *ccprovider.ChaincodeContainerInfo) error + Wait func(ccci *ccprovider.ChaincodeContainerInfo) (int, error) + type RuntimeLauncher struct + Metrics *LaunchMetrics + PackageProvider PackageProvider + Registry LaunchRegistry + Runtime Runtime + StartupTimeout time.Duration + func (r *RuntimeLauncher) Launch(ccci *ccprovider.ChaincodeContainerInfo) error + type State int + const Created + const Established + const Ready + func (s State) String() string + type SystemCCProvider interface + IsSysCC func(name string) bool + IsSysCCAndNotInvokableCC2CC func(name string) bool + type TransactionContext struct + AllowedCollectionAccess map[string]bool + ChainID string + CollectionStore privdata.CollectionStore + HistoryQueryExecutor ledger.HistoryQueryExecutor + IsInitTransaction bool + Proposal *pb.Proposal + ResponseNotifier chan *pb.ChaincodeMessage + SignedProp *pb.SignedProposal + TXSimulator ledger.TxSimulator + func (t *TransactionContext) CleanupQueryContext(queryID string) + func (t *TransactionContext) CleanupQueryContextWithBookmark(queryID string) string + func (t *TransactionContext) CloseQueryIterators() + func (t *TransactionContext) GetPendingQueryResult(queryID string) *PendingQueryResult + func (t *TransactionContext) GetQueryIterator(queryID string) commonledger.ResultsIterator + func (t *TransactionContext) GetTotalReturnCount(queryID string) *int32 + func (t *TransactionContext) InitializeQueryContext(queryID string, iter commonledger.ResultsIterator) + type TransactionContexts struct + func NewTransactionContexts() *TransactionContexts + func (c *TransactionContexts) Close() + func (c *TransactionContexts) Create(txParams *ccprovider.TransactionParams) (*TransactionContext, error) + func (c *TransactionContexts) Delete(chainID, txID string) + func (c *TransactionContexts) Get(chainID, txID string) *TransactionContext + type TransactionRegistry interface + Add func(channelID, txID string) bool + Remove func(channelID, txID string) + type UUIDGenerator interface + New func() string + type UUIDGeneratorFunc func() string + func (u UUIDGeneratorFunc) New() string