peerkeeper

package
v0.0.0-...-67070f9 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerKeeper

type PeerKeeper interface {
	AddPeer(id string, peer python.Peer)
	GetPeers(id string) []python.Peer
}

Implementations should be thread safe.

type RandomizedPeerKeeper

type RandomizedPeerKeeper struct {
	// contains filtered or unexported fields
}

func NewRandomizedPeerKeeper

func NewRandomizedPeerKeeper(peerNum int) *RandomizedPeerKeeper

func (*RandomizedPeerKeeper) AddPeer

func (pk *RandomizedPeerKeeper) AddPeer(id string, peer python.Peer)

func (*RandomizedPeerKeeper) GetPeers

func (pk *RandomizedPeerKeeper) GetPeers(peerId string) []python.Peer

Jump to

Keyboard shortcuts

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