Documentation ¶
Index ¶
- type Discovery
- type Member
- type PeerGroup
- func (g PeerGroup) Contains(peer *Member) bool
- func (g PeerGroup) ContainsAll(peerGroup PeerGroup) bool
- func (g PeerGroup) ContainsAny(peerGroup PeerGroup) bool
- func (g PeerGroup) ContainsLocal() bool
- func (g PeerGroup) ContainsPeer(endpoint string) bool
- func (g PeerGroup) ContainsRemote() bool
- func (g PeerGroup) Len() int
- func (g PeerGroup) Less(i, j int) bool
- func (g PeerGroup) Local() (*Member, bool)
- func (g PeerGroup) Remote() PeerGroup
- func (g PeerGroup) Shuffle() PeerGroup
- func (g PeerGroup) Sort() PeerGroup
- func (g PeerGroup) String() string
- func (g PeerGroup) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
Discovery provides functions to retrieve info about the local peer and other peers in a given channel
func (*Discovery) GetMembers ¶
GetMembers returns members filtered by the given filter
type Member ¶
type Member struct { discovery.NetworkMember ChannelID string MSPID string Local bool // Indicates whether this member is the local peer }
Member wraps a NetworkMember and provides additional info
type PeerGroup ¶
type PeerGroup []*Member
PeerGroup is a group of peers
func (PeerGroup) Contains ¶
Contains returns true if the given peer is contained within this peer group
func (PeerGroup) ContainsAll ¶
ContainsAll returns true if ALL of the peers within the given peer group are contained within this peer group
func (PeerGroup) ContainsAny ¶
ContainsAny returns true if ANY of the peers within the given peer group are contained within this peer group
func (PeerGroup) ContainsLocal ¶
ContainsLocal return true if one of the peers in the group is the local peer
func (PeerGroup) ContainsPeer ¶
ContainsPeer returns true if the given peer is contained within this peer group
func (PeerGroup) ContainsRemote ¶ added in v0.1.6
ContainsRemote return true if one or more of the peers in the group is a remote peer