gossip

package
v0.0.0-...-579b097 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoverySupport

type DiscoverySupport struct {
	Gossip
}

DiscoverySupport implements support that is used for service discovery that is obtained from gossip

func NewDiscoverySupport

func NewDiscoverySupport(g Gossip) *DiscoverySupport

NewDiscoverySupport creates a new DiscoverySupport

func (*DiscoverySupport) ChannelExists

func (s *DiscoverySupport) ChannelExists(channel string) bool

ChannelExists returns whether a given channel exists or not

func (*DiscoverySupport) Peers

func (s *DiscoverySupport) Peers() discovery.Members

Peers returns the NetworkMembers considered alive

func (*DiscoverySupport) PeersOfChannel

func (s *DiscoverySupport) PeersOfChannel(chain common.ChannelID) discovery.Members

PeersOfChannel returns the NetworkMembers considered alive and also subscribed to the channel given

type Gossip

type Gossip interface {
	// IdentityInfo returns identity information about peers
	IdentityInfo() api.PeerIdentitySet
	// GetPeers returns the NetworkMembers considered alive
	Peers() []discovery.NetworkMember
	// PeersOfChannel returns the NetworkMembers considered alive
	// and also subscribed to the channel given
	PeersOfChannel(common.ChannelID) []discovery.NetworkMember
	// SelfChannelInfo returns the peer's latest StateInfo message of a given channel
	SelfChannelInfo(common.ChannelID) *protoext.SignedGossipMessage
	// SelfMembershipInfo returns the peer's membership information
	SelfMembershipInfo() discovery.NetworkMember
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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