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
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"`
}
pluginfig SCC插件配置
type Provider ¶
type Provider struct {
Peer peer.Operations
PeerSupport peer.Support
Registrar Registrar
SysCCs []SelfDescribingSysCC
}
提供程序实现SysCCProvider.SystemChainCodeProvider
func NewProvider ¶
NewProvider创建新的提供程序实例
func (*Provider) DeDeploySysCCs ¶
func (p *Provider) DeDeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider)
DEDEPLoySyscs用于单元测试中,在 在同一进程中重新启动它们。这允许系统干净启动。 在同一过程中
func (*Provider) DeploySysCCs ¶
func (p *Provider) DeploySysCCs(chainID string, ccp ccprovider.ChaincodeProvider)
deployysccs是系统链码的钩子,系统链码在结构中注册。 注意,chaincode必须像用户chaincode一样部署和启动。
func (*Provider) GetApplicationConfig ¶
func (p *Provider) GetApplicationConfig(cid string) (channelconfig.Application, bool)
GETAPPLICATIOFIGG返回通道的CONTXXAPPLATION.SARDCONFIGG 以及应用程序配置是否存在
func (*Provider) GetQueryExecutorForLedger ¶
func (p *Provider) GetQueryExecutorForLedger(cid string) (ledger.QueryExecutor, error)
GetQueryExecutorForLedger返回指定通道的查询执行器
func (*Provider) IsSysCCAndNotInvokableCC2CC ¶
如果链码返回,则ISSyCtoNoToNoKabcLC2CC返回true。 是系统链代码,不能通过调用*调用 a cc2cc invocation
func (*Provider) IsSysCCAndNotInvokableExternal ¶
如果链码为 是系统链代码,不能通过调用*调用 向这位同行提出的建议
func (*Provider) PolicyManager ¶
返回与传递的通道关联的策略管理器 以及策略管理器是否存在
func (*Provider) RegisterSysCC ¶
func (p *Provider) RegisterSysCC(scc SelfDescribingSysCC)
registeryscc向syscc提供程序注册系统链码。
type SelfDescribingSysCC ¶
type SelfDescribingSysCC interface {
//系统链码的唯一名称
Name() string
//系统链码的路径;当前未使用
Path() string
//initargs用于启动系统链代码的初始化参数
InitArgs() [][]byte
//chaincode返回基础chaincode
Chaincode() shim.Chaincode
//InvokableExternal跟踪
//可以调用此系统链代码
//通过发送给此对等方的建议
InvokableExternal() bool
//invokablecc2cc跟踪
//可以调用此系统链代码
//通过链码到链码的方式
//调用
InvokableCC2CC() bool
//启用了一个方便的开关来启用/禁用系统链码
//必须从importSyscs.go中删除条目
Enabled() bool
}
func CreatePluginSysCCs ¶
func CreatePluginSysCCs(p *Provider) []SelfDescribingSysCC
createpluginssccs创建所有由plugin加载的系统链码。
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用于启动系统链代码的初始化参数
InitArgs [][]byte
//链代码保存实际的链表实例。
Chaincode shim.Chaincode
//InvokableExternal跟踪
//可以调用此系统链代码
//通过发送给此对等方的建议
InvokableExternal bool
//invokablecc2cc跟踪
//可以调用此系统链代码
//通过链码到链码的方式
//调用
InvokableCC2CC bool
//启用了一个方便的开关来启用/禁用系统链码
//必须从importSyscs.go中删除条目
Enabled bool
}
系统链代码定义初始化系统链代码所需的元数据 当织物出现时。通过添加 importSyscs.go中的条目
Source Files
¶
Click to show internal directories.
Click to hide internal directories.