Documentation ¶
Index ¶
- type PluginConfig
- type Provider
- func (p *Provider) DeDeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider)
- func (p *Provider) DeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider)
- func (p *Provider) GetApplicationConfig(cid string) (channelconfig.Application, bool)
- func (p *Provider) GetQueryExecutorForLedger(cid string) (ledger.QueryExecutor, error)
- func (p *Provider) IsSysCC(name string) bool
- func (p *Provider) IsSysCCAndNotInvokableCC2CC(name string) bool
- func (p *Provider) IsSysCCAndNotInvokableExternal(name string) bool
- func (p *Provider) PolicyManager(channelID string) (policies.Manager, bool)
- func (p *Provider) RegisterSysCC(scc SelfDescribingSysCC)
- type Registrar
- type SelfDescribingSysCC
- type SysCCWrapper
- func (sccw *SysCCWrapper) Chaincode() shim.Chaincode
- func (sccw *SysCCWrapper) Enabled() bool
- func (sccw *SysCCWrapper) InitArgs() [][]byte
- func (sccw *SysCCWrapper) InvokableCC2CC() bool
- func (sccw *SysCCWrapper) InvokableExternal() bool
- func (sccw *SysCCWrapper) Name() string
- func (sccw *SysCCWrapper) Path() string
- type SystemChaincode
- type ThrottledChaincode
- type ThrottledSysCC
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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"` }
PluginConfig SCC plugin configuration
type Provider ¶
type Provider struct { Peer peer.Operations PeerSupport peer.Support Registrar Registrar SysCCs []SelfDescribingSysCC }
Provider implements sysccprovider.SystemChaincodeProvider
func NewProvider ¶
NewProvider creates a new Provider instance
func (*Provider) DeDeploySysCCs ¶
func (p *Provider) DeDeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider)
DeDeploySysCCs is used in unit tests to stop and remove the system chaincodes before restarting them in the same process. This allows clean start of the system in the same process
func (*Provider) DeploySysCCs ¶
func (p *Provider) DeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider)
DeploySysCCs is the hook for system chaincodes where system chaincodes are registered with the fabric note the chaincode must still be deployed and launched like a user chaincode will be
func (*Provider) GetApplicationConfig ¶
func (p *Provider) GetApplicationConfig(cid string) (channelconfig.Application, bool)
GetApplicationConfig returns the configtxapplication.SharedConfig for the channel and whether the Application config exists
func (*Provider) GetQueryExecutorForLedger ¶
func (p *Provider) GetQueryExecutorForLedger(cid string) (ledger.QueryExecutor, error)
GetQueryExecutorForLedger returns a query executor for the specified channel
func (*Provider) IsSysCCAndNotInvokableCC2CC ¶
IsSysCCAndNotInvokableCC2CC returns true if the chaincode is a system chaincode and *CANNOT* be invoked through a cc2cc invocation
func (*Provider) IsSysCCAndNotInvokableExternal ¶
IsSysCCAndNotInvokableExternal returns true if the chaincode is a system chaincode and *CANNOT* be invoked through a proposal to this peer
func (*Provider) PolicyManager ¶
Returns the policy manager associated to the passed channel and whether the policy manager exists
func (*Provider) RegisterSysCC ¶
func (p *Provider) RegisterSysCC(scc SelfDescribingSysCC)
RegisterSysCC registers a system chaincode with the syscc provider.
type Registrar ¶
type Registrar interface { // Register registers a system chaincode Register(ccid ccintf.CCID, cc shim.Chaincode) error }
Registrar provides a way for system chaincodes to be registered
type SelfDescribingSysCC ¶
type SelfDescribingSysCC interface { //Unique name of the system chaincode Name() string //Path to the system chaincode; currently not used Path() string //InitArgs initialization arguments to startup the system chaincode InitArgs() [][]byte // Chaincode returns the underlying chaincode Chaincode() shim.Chaincode // InvokableExternal keeps track of whether // this system chaincode can be invoked // through a proposal sent to this peer InvokableExternal() bool // InvokableCC2CC keeps track of whether // this system chaincode can be invoked // by way of a chaincode-to-chaincode // invocation InvokableCC2CC() bool // Enabled a convenient switch to enable/disable system chaincode without // having to remove entry from importsysccs.go Enabled() bool }
func CreatePluginSysCCs ¶
func CreatePluginSysCCs(p *Provider) []SelfDescribingSysCC
CreatePluginSysCCs creates all of the system chaincodes which are compiled into fabric
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 { //Unique name of the system chaincode Name string //Path to the system chaincode; currently not used Path string //InitArgs initialization arguments to startup the system chaincode InitArgs [][]byte // Chaincode holds the actual chaincode instance Chaincode shim.Chaincode // InvokableExternal keeps track of whether // this system chaincode can be invoked // through a proposal sent to this peer InvokableExternal bool // InvokableCC2CC keeps track of whether // this system chaincode can be invoked // by way of a chaincode-to-chaincode // invocation InvokableCC2CC bool // Enabled a convenient switch to enable/disable system chaincode without // having to remove entry from importsysccs.go Enabled bool }
SystemChaincode defines the metadata needed to initialize system chaincode when the fabric comes up. SystemChaincodes are installed by adding an entry in importsysccs.go
type ThrottledChaincode ¶
type ThrottledChaincode struct {
// contains filtered or unexported fields
}
func (*ThrottledChaincode) Init ¶
func (t *ThrottledChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response
func (*ThrottledChaincode) Invoke ¶
func (t *ThrottledChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response
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
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured.
|
Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured. |
mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |