Documentation ¶
Index ¶
- func InitGossipService(peerIdentity []byte, endpoint string, s *grpc.Server, ...) error
- func InitGossipServiceCustomDeliveryFactory(peerIdentity []byte, endpoint string, s *grpc.Server, ...) error
- type Config
- type ConfigProcessor
- type DataStoreSupport
- type DeliveryServiceFactory
- type GossipService
- type Support
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitGossipService ¶
func InitGossipService(peerIdentity []byte, endpoint string, s *grpc.Server, certs *gossipCommon.TLSCertificates, mcs api.MessageCryptoService, secAdv api.SecurityAdvisor, secureDialOpts api.PeerSecureDialOpts, bootPeers ...string) error
initgossipservice初始化八卦服务
func InitGossipServiceCustomDeliveryFactory ¶
func InitGossipServiceCustomDeliveryFactory(peerIdentity []byte, endpoint string, s *grpc.Server, certs *gossipCommon.TLSCertificates, factory DeliveryServiceFactory, mcs api.MessageCryptoService, secAdv api.SecurityAdvisor, secureDialOpts api.PeerSecureDialOpts, bootPeers ...string) error
initgossipserviceCustomDeliveryFactory使用自定义传递工厂初始化八卦服务 实现,可能对测试和模拟有用
Types ¶
type Config ¶
type Config interface { //chainID返回此通道的chainID ChainID() string //组织将组织ID的映射返回到ApplicationOrgConfig Organizations() map[string]channelconfig.ApplicationOrg //序列应返回当前配置的序列号 Sequence() uint64 //orderAddresses返回要连接以调用广播/传递的有效订购者地址列表 OrdererAddresses() []string }
config枚举八卦所需的配置方法
type ConfigProcessor ¶
type ConfigProcessor interface { //每当初始化或更新通道的配置时,应调用processconfig。 ProcessConfigUpdate(config Config) }
ConfigProcessor接收配置更新
type DataStoreSupport ¶
type DataStoreSupport struct { committer.Committer privdata2.TransientStore }
数据存储支持聚合接口 处理传入块或私有数据
type DeliveryServiceFactory ¶
type DeliveryServiceFactory interface { //返回传递客户端的实例 Service(g GossipService, endpoints []string, msc api.MessageCryptoService) (deliverclient.DeliverService, error) }
DeliveryServiceFactory工厂以创建和初始化传递服务实例
type GossipService ¶
type GossipService interface { gossip.Gossip //distributeprivatedata将私有数据分发给集合中的对等方 //根据policyStore和policyParser诱导的策略 DistributePrivateData(chainID string, txID string, privateData *transientstore.TxPvtReadWriteSetWithConfigInfo, blkHt uint64) error //newconfigeventer创建一个configprocessor,channelconfig.bundlesource最终可以将配置更新路由到 NewConfigEventer() ConfigProcessor //InitializeChannel分配状态提供程序,每次执行时应在每个通道调用一次。 InitializeChannel(chainID string, endpoints []string, support Support) //对于给定的链,addPayload将消息有效负载附加到 AddPayload(chainID string, payload *gproto.Payload) error }
gossipservice将流言和状态功能封装到单个接口中
type Support ¶
type Support struct { Validator txvalidator.Validator Committer committer.Committer Store privdata2.TransientStore Cs privdata.CollectionStore IdDeserializeFactory privdata2.IdentityDeserializerFactory }
支持聚合多个 八卦服务所需的接口
Click to show internal directories.
Click to hide internal directories.