fabric: github.com/hyperledger/fabric/gossip/service Index | Files

package service

import "github.com/hyperledger/fabric/gossip/service"

Index

Package Files

eventer.go gossip_service.go

func InitGossipService Uses

func InitGossipService(peerIdentity []byte, metricsProvider metrics.Provider, endpoint string, s *grpc.Server,
    certs *gossipCommon.TLSCertificates, mcs api.MessageCryptoService, secAdv api.SecurityAdvisor,
    secureDialOpts api.PeerSecureDialOpts, bootPeers ...string) error

InitGossipService initialize gossip service

func InitGossipServiceCustomDeliveryFactory Uses

func InitGossipServiceCustomDeliveryFactory(peerIdentity []byte, metricsProvider metrics.Provider, endpoint string,
    s *grpc.Server, certs *gossipCommon.TLSCertificates, factory DeliveryServiceFactory, mcs api.MessageCryptoService,
    secAdv api.SecurityAdvisor, secureDialOpts api.PeerSecureDialOpts, bootPeers ...string) error

InitGossipServiceCustomDeliveryFactory initialize gossip service with customize delivery factory implementation, might be useful for testing and mocking purposes

type ApplicationOrgs Uses

type ApplicationOrgs map[string]channelconfig.ApplicationOrg

ApplicationOrgs defines a mapping from ApplicationOrg by ID.

type Config Uses

type Config interface {
    // ChainID returns the chainID for this channel
    ChainID() string

    // OrdererOrgs returns the organizations of the orderers
    OrdererOrgs() []string

    // OrdererAddressesByOrgs returns a mapping from the organization ID
    // to the endpoints of the orderers
    OrdererAddressesByOrgs() map[string][]string

    // ApplicationOrgs returns a map of org ID to ApplicationOrgConfig
    ApplicationOrgs() ApplicationOrgs

    // Sequence should return the sequence number of the current configuration
    Sequence() uint64

    // OrdererAddresses returns the list of valid orderer addresses to connect to to invoke Broadcast/Deliver
    OrdererAddresses() []string
}

Config enumerates the configuration methods required by gossip

type ConfigProcessor Uses

type ConfigProcessor interface {
    // ProcessConfig should be invoked whenever a channel's configuration is initialized or updated
    ProcessConfigUpdate(config Config)
}

ConfigProcessor receives config updates

type DataStoreSupport Uses

type DataStoreSupport struct {
    committer.Committer
    privdata2.TransientStore
}

DataStoreSupport aggregates interfaces capable of handling either incoming blocks or private data

type DeliveryServiceFactory Uses

type DeliveryServiceFactory interface {
    // Returns an instance of delivery client
    Service(g GossipService, oac OrdererAddressConfig, msc api.MessageCryptoService) (deliverclient.DeliverService, error)
}

DeliveryServiceFactory factory to create and initialize delivery service instance

type GossipService Uses

type GossipService interface {
    gossip.Gossip

    // DistributePrivateData distributes private data to the peers in the collections
    // according to policies induced by the PolicyStore and PolicyParser
    DistributePrivateData(chainID string, txID string, privateData *transientstore.TxPvtReadWriteSetWithConfigInfo, blkHt uint64) error
    // NewConfigEventer creates a ConfigProcessor which the channelconfig.BundleSource can ultimately route config updates to
    NewConfigEventer() ConfigProcessor
    // InitializeChannel allocates the state provider and should be invoked once per channel per execution
    InitializeChannel(chainID string, oac OrdererAddressConfig, support Support)
    // AddPayload appends message payload to for given chain
    AddPayload(chainID string, payload *gproto.Payload) error
}

GossipService encapsulates gossip and state capabilities into single interface

func GetGossipService Uses

func GetGossipService() GossipService

GetGossipService returns an instance of gossip service

type OrdererAddressConfig Uses

type OrdererAddressConfig struct {
    Addresses      []string
    AddressesByOrg map[string][]string
    Organizations  []string
}

OrdererAddressConfig defines the addresses of the ordering service nodes

type Support Uses

type Support struct {
    Validator            txvalidator.Validator
    Committer            committer.Committer
    Store                privdata2.TransientStore
    Cs                   privdata.CollectionStore
    IdDeserializeFactory privdata2.IdentityDeserializerFactory
    CapabilityProvider   privdata2.CapabilityProvider
}

Support aggregates functionality of several interfaces required by gossip service

Package service imports 25 packages (graph) and is imported by 14 packages. Updated 2019-08-07. Refresh now. Tools for package owners.