scc

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const SysCCVersion = "syscc"

Variables

This section is empty.

Functions

func ChaincodeID

func ChaincodeID(ccName string) string

func DeploySysCC

func DeploySysCC(sysCC SelfDescribingSysCC, chaincodeStreamHandler ChaincodeStreamHandler)

Types

type BuiltinSCCs

type BuiltinSCCs map[string]struct{}

func (BuiltinSCCs) IsSysCC

func (bccs BuiltinSCCs) IsSysCC(name string) bool

type ChaincodeStreamHandler

type ChaincodeStreamHandler interface {
	HandleChaincodeStream(ccintf.ChaincodeStream) error
	LaunchInProc(packageID string) <-chan struct{}
}

type PluginConfig

type PluginConfig struct {
	Enabled           bool   `mapstructure:"enabled" yaml:"enabled"`
	Name              string `mapstructure:"name" yaml:"name"`
	Path              string `mapstructure:"path" yaml:"path"`
	InvokableExternal bool   `mapstructure:"invokableExternal" yaml:"invokableExternal"`
	InvokableCC2CC    bool   `mapstructure:"invokableCC2CC" yaml:"invokableCC2CC"`
}

type Provider

type Provider struct {
	Peer      *peer.Peer
	SysCCs    []SelfDescribingSysCC
	Whitelist Whitelist
}

func (*Provider) DeploySysCCs

func (p *Provider) DeploySysCCs(chaincodeStreamHandler ChaincodeStreamHandler)

func (*Provider) GetApplicationConfig

func (p *Provider) GetApplicationConfig(cid string) (channelconfig.Application, bool)

func (*Provider) GetQueryExecutorForLedger

func (p *Provider) GetQueryExecutorForLedger(cid string) (ledger.QueryExecutor, error)

func (*Provider) IsSysCC

func (p *Provider) IsSysCC(name string) bool

func (*Provider) PolicyManager

func (p *Provider) PolicyManager(channelID string) (policies.Manager, bool)

func (*Provider) RegisterSysCC

func (p *Provider) RegisterSysCC(scc SelfDescribingSysCC) error

type SelfDescribingSysCC

type SelfDescribingSysCC interface {
	Name() string

	Path() string

	InitArgs() [][]byte

	Chaincode() shim.Chaincode

	InvokableExternal() bool

	InvokableCC2CC() bool

	Enabled() bool
}

func CreatePluginSysCCs

func CreatePluginSysCCs(p *Provider) []SelfDescribingSysCC

type SendPanicFailure

type SendPanicFailure string

func (SendPanicFailure) Error

func (e SendPanicFailure) Error() string

type SysCCWrapper

type SysCCWrapper struct {
	SCC *SystemChaincode
}

func (*SysCCWrapper) Chaincode

func (sccw *SysCCWrapper) Chaincode() shim.Chaincode

func (*SysCCWrapper) Enabled

func (sccw *SysCCWrapper) Enabled() bool

func (*SysCCWrapper) InitArgs

func (sccw *SysCCWrapper) InitArgs() [][]byte

func (*SysCCWrapper) InvokableCC2CC

func (sccw *SysCCWrapper) InvokableCC2CC() bool

func (*SysCCWrapper) InvokableExternal

func (sccw *SysCCWrapper) InvokableExternal() bool

func (*SysCCWrapper) Name

func (sccw *SysCCWrapper) Name() string

func (*SysCCWrapper) Path

func (sccw *SysCCWrapper) Path() string

type SystemChaincode

type SystemChaincode struct {
	Name string

	Path string

	InitArgs [][]byte

	Chaincode shim.Chaincode

	InvokableExternal bool

	InvokableCC2CC bool

	Enabled bool
}

type ThrottledChaincode

type ThrottledChaincode struct {
	// contains filtered or unexported fields
}

func (*ThrottledChaincode) Init

func (*ThrottledChaincode) Invoke

type ThrottledSysCC

type ThrottledSysCC struct {
	SelfDescribingSysCC
	// contains filtered or unexported fields
}

func Throttle

func Throttle(limit int, systemCC SelfDescribingSysCC) *ThrottledSysCC

func (*ThrottledSysCC) Chaincode

func (t *ThrottledSysCC) Chaincode() shim.Chaincode

type Whitelist

type Whitelist map[string]bool

func GlobalWhitelist

func GlobalWhitelist() Whitelist

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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