Documentation ¶
Index ¶
- Variables
- func DeployedChaincodes(q Query, filter ChaincodePredicate, loadCollections bool, chaincodes ...string) (chaincode.MetadataSet, error)
- type ChaincodePredicate
- type Enumerate
- type Enumerator
- type HandleMetadataUpdate
- type LifeCycleChangeListener
- type Lifecycle
- type Query
- type QueryCreator
- type QueryCreatorFunc
- type Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //Logger是此包的日志记录实例。 //它被导出是因为测试会覆盖其后端 Logger = flogging.MustGetLogger("discovery.lifecycle") )
Functions ¶
func DeployedChaincodes ¶
func DeployedChaincodes(q Query, filter ChaincodePredicate, loadCollections bool, chaincodes ...string) (chaincode.MetadataSet, error)
deployed chaincodes检索给定已部署链代码的元数据
Types ¶
type ChaincodePredicate ¶
chaincodePredicate根据其元数据接受或拒绝chaincode
var ( //AcceptAll返回接受所有元数据的谓词 AcceptAll ChaincodePredicate = func(cc chaincode.Metadata) bool { return true } )
type Enumerate ¶
type Enumerate func() ([]chaincode.InstalledChaincode, error)
type Enumerator ¶
type Enumerator interface { // Enumerate() ([]chaincode.InstalledChaincode, error) }
枚举器枚举链代码
type HandleMetadataUpdate ¶
type HandleMetadataUpdate func(channel string, chaincodes chaincode.MetadataSet)
handleMetadataUpdate在链代码生命周期更改时触发
func (HandleMetadataUpdate) LifeCycleChangeListener ¶
func (mdUpdate HandleMetadataUpdate) LifeCycleChangeListener(channel string, chaincodes chaincode.MetadataSet)
LifecycleChangeListener在元数据发生更改时运行
type LifeCycleChangeListener ¶
type LifeCycleChangeListener interface {
LifeCycleChangeListener(channel string, chaincodes chaincode.MetadataSet)
}
LifecycleChangeListener在元数据发生更改时运行 特定通道上下文中的链代码
type Lifecycle ¶
Lifecycle管理有关链码生命周期的信息
func NewLifeCycle ¶
func NewLifeCycle(installedChaincodes Enumerator) (*Lifecycle, error)
NewLifecycle创建新的生命周期实例
func (*Lifecycle) AddListener ¶
func (lc *Lifecycle) AddListener(listener LifeCycleChangeListener)
func (*Lifecycle) NewChannelSubscription ¶
func (lc *Lifecycle) NewChannelSubscription(channel string, queryCreator QueryCreator) (*Subscription, error)
newchannelsubscription订阅通道
type Query ¶
type Query interface { //GetState获取给定命名空间和键的值。对于chaincode,命名空间对应于chaincodeid GetState(namespace string, key string) ([]byte, error) //完成释放由QueryExecutor占用的资源 Done() }
查询查询状态
type QueryCreator ¶
type QueryCreatorFunc ¶
querycreatorfunc创建新查询
func (QueryCreatorFunc) NewQuery ¶
func (qc QueryCreatorFunc) NewQuery() (Query, error)
new query创建新查询,或失败时出错
type Subscription ¶
订阅通道信息流 关于进入生命周期的特定渠道
func (*Subscription) ChaincodeDeployDone ¶
func (sub *Subscription) ChaincodeDeployDone(succeeded bool)
当chaincode deploy事务或chaincode安装时调用chaincodedeploydone
func (*Subscription) HandleChaincodeDeploy ¶
func (sub *Subscription) HandleChaincodeDeploy(chaincodeDefinition *cceventmgmt.ChaincodeDefinition, dbArtifactsTar []byte) error
当通过部署事务部署链代码并且chaicndoe已经 安装在对等机上。当对等端上安装了已部署的链代码时,也会调用此函数。
Directories ¶
Path | Synopsis |
---|---|
此源码被清华学神尹成大魔王专业翻译分析并修改 尹成QQ77025077 尹成微信18510341407 尹成所在QQ群721929980 尹成邮箱 yinc13@mails.tsinghua.edu.cn 尹成毕业于清华大学,微软区块链领域全球最有价值专家 https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 Code generated by mockery v1.0.0.
|
此源码被清华学神尹成大魔王专业翻译分析并修改 尹成QQ77025077 尹成微信18510341407 尹成所在QQ群721929980 尹成邮箱 yinc13@mails.tsinghua.edu.cn 尹成毕业于清华大学,微软区块链领域全球最有价值专家 https://mvp.microsoft.com/zh-cn/PublicProfile/4033620 Code generated by mockery v1.0.0. |
Click to show internal directories.
Click to hide internal directories.