channel

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: 22 Imported by: 0

Documentation

Index

Constants

View Source
const DefMsgExpirationTimeout = election.DefLeaderAliveThreshold * 10

Variables

This section is empty.

Functions

func GenerateMAC

func GenerateMAC(pkiID common.PKIidType, channelID common.ChannelID) []byte

Types

type Adapter

type Adapter interface {
	Sign(msg *proto.GossipMessage) (*protoext.SignedGossipMessage, error)

	GetConf() Config

	Gossip(message *protoext.SignedGossipMessage)

	Forward(message protoext.ReceivedMessage)

	DeMultiplex(interface{})

	GetMembership() []discovery.NetworkMember

	Lookup(PKIID common.PKIidType) *discovery.NetworkMember

	Send(msg *protoext.SignedGossipMessage, peers ...*comm.RemotePeer)

	ValidateStateInfoMessage(message *protoext.SignedGossipMessage) error

	GetOrgOfPeer(pkiID common.PKIidType) api.OrgIdentityType

	GetIdentityByPKIID(pkiID common.PKIidType) api.PeerIdentityType
}

type Config

type Config struct {
	ID                          string
	PublishStateInfoInterval    time.Duration
	MaxBlockCountToStore        int
	PullPeerNum                 int
	PullInterval                time.Duration
	RequestStateInfoInterval    time.Duration
	BlockExpirationInterval     time.Duration
	StateInfoCacheSweepInterval time.Duration
	TimeForMembershipTracker    time.Duration
	DigestWaitTime              time.Duration
	RequestWaitTime             time.Duration
	ResponseWaitTime            time.Duration
	MsgExpirationTimeout        time.Duration
}

type GossipChannel

type GossipChannel interface {
	Self() *protoext.SignedGossipMessage

	GetPeers() []discovery.NetworkMember

	PeerFilter(api.SubChannelSelectionCriteria) filter.RoutingFilter

	IsMemberInChan(member discovery.NetworkMember) bool

	UpdateLedgerHeight(height uint64)

	UpdateChaincodes(chaincode []*proto.Chaincode)

	IsOrgInChannel(membersOrg api.OrgIdentityType) bool

	EligibleForChannel(member discovery.NetworkMember) bool

	HandleMessage(protoext.ReceivedMessage)

	AddToMsgStore(msg *protoext.SignedGossipMessage)

	ConfigureChannel(joinMsg api.JoinChannelMessage)

	LeaveChannel()

	Stop()
}

func NewGossipChannel

func NewGossipChannel(pkiID common.PKIidType, org api.OrgIdentityType, mcs api.MessageCryptoService,
	channelID common.ChannelID, adapter Adapter, joinMsg api.JoinChannelMessage,
	metrics *metrics.MembershipMetrics, logger util.Logger) GossipChannel

Jump to

Keyboard shortcuts

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