peerset

package
v1.6.1-0...-b16536f Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerSet

type PeerSet struct {
	Peers []*peer.Peer
}

PeerSet is slice of Peers with methods operation on this slice.

func (*PeerSet) Add

func (l *PeerSet) Add(pe *peer.Peer) bool

Add new peer to the set.

func (*PeerSet) Has

func (l *PeerSet) Has(pe *peer.Peer) bool

Has returns true if the set contains the peer.

func (*PeerSet) Len

func (l *PeerSet) Len() int

Len returns the number of items in the set.

func (*PeerSet) Remove

func (l *PeerSet) Remove(pe *peer.Peer) bool

Remove peer from the set.

Jump to

Keyboard shortcuts

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