gossip

package
v0.0.0-...-95b87ed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindPort int

	ID string

	BootstrapPeers []string

	PropagateIterations int

	PropagatePeerNum int

	MaxBlockCountToStore int

	MaxPropagationBurstSize int

	MaxPropagationBurstLatency time.Duration

	PullInterval time.Duration

	PullPeerNum int

	SkipBlockVerification bool

	PublishCertPeriod time.Duration

	PublishStateInfoInterval time.Duration

	RequestStateInfoInterval time.Duration

	TLSCerts *common.TLSCertificates

	InternalEndpoint string

	ExternalEndpoint string

	TimeForMembershipTracker time.Duration

	DigestWaitTime time.Duration

	RequestWaitTime time.Duration

	ResponseWaitTime time.Duration

	DialTimeout time.Duration

	ConnTimeout time.Duration

	RecvBuffSize int

	SendBuffSize int

	MsgExpirationTimeout time.Duration

	AliveTimeInterval time.Duration

	AliveExpirationTimeout time.Duration

	AliveExpirationCheckInterval time.Duration

	ReconnectInterval time.Duration
}

func GlobalConfig

func GlobalConfig(endpoint string, certs *common.TLSCertificates, bootPeers ...string) (*Config, error)

type GossipImpl

type GossipImpl struct {
	*comm.ChannelDeMultiplexer
	// contains filtered or unexported fields
}

func New

func New(conf *Config, s *grpc.Server, sa api.SecurityAdvisor,
	mcs api.MessageCryptoService, selfIdentity api.PeerIdentityType,
	secureDialOpts api.PeerSecureDialOpts, gossipMetrics *metrics.GossipMetrics) *GossipImpl

func (*GossipImpl) Accept

func (g *GossipImpl) Accept(acceptor common.MessageAcceptor, passThrough bool) (<-chan *pg.GossipMessage, <-chan protoext.ReceivedMessage)

func (*GossipImpl) Gossip

func (g *GossipImpl) Gossip(msg *pg.GossipMessage)

func (*GossipImpl) IdentityInfo

func (g *GossipImpl) IdentityInfo() api.PeerIdentitySet

func (*GossipImpl) IsInMyOrg

func (g *GossipImpl) IsInMyOrg(member discovery.NetworkMember) bool

func (*GossipImpl) JoinChan

func (g *GossipImpl) JoinChan(joinMsg api.JoinChannelMessage, channelID common.ChannelID)

func (*GossipImpl) LeaveChan

func (g *GossipImpl) LeaveChan(channelID common.ChannelID)

func (*GossipImpl) PeerFilter

func (g *GossipImpl) PeerFilter(channel common.ChannelID, messagePredicate api.SubChannelSelectionCriteria) (filter.RoutingFilter, error)

func (*GossipImpl) Peers

func (g *GossipImpl) Peers() []discovery.NetworkMember

func (*GossipImpl) PeersOfChannel

func (g *GossipImpl) PeersOfChannel(channel common.ChannelID) []discovery.NetworkMember

func (*GossipImpl) SelfChannelInfo

func (g *GossipImpl) SelfChannelInfo(chain common.ChannelID) *protoext.SignedGossipMessage

func (*GossipImpl) SelfMembershipInfo

func (g *GossipImpl) SelfMembershipInfo() discovery.NetworkMember

func (*GossipImpl) Send

func (g *GossipImpl) Send(msg *pg.GossipMessage, peers ...*comm.RemotePeer)

func (*GossipImpl) SendByCriteria

func (g *GossipImpl) SendByCriteria(msg *protoext.SignedGossipMessage, criteria SendCriteria) error

func (*GossipImpl) Stop

func (g *GossipImpl) Stop()

func (*GossipImpl) SuspectPeers

func (g *GossipImpl) SuspectPeers(isSuspected api.PeerSuspector)

func (*GossipImpl) UpdateChaincodes

func (g *GossipImpl) UpdateChaincodes(chaincodes []*pg.Chaincode, channelID common.ChannelID)

func (*GossipImpl) UpdateLedgerHeight

func (g *GossipImpl) UpdateLedgerHeight(height uint64, channelID common.ChannelID)

func (*GossipImpl) UpdateMetadata

func (g *GossipImpl) UpdateMetadata(md []byte)

type SendCriteria

type SendCriteria struct {
	Timeout    time.Duration
	MinAck     int
	MaxPeers   int
	IsEligible filter.RoutingFilter
	Channel    common.ChannelID
}

func (SendCriteria) String

func (sc SendCriteria) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL