mpeer

package
v0.0.0-...-4adfca9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Peer

type Peer struct {
	Type       PeerType
	PubKeyHash string
	Ip         string
	Port       string
}

type PeerManager

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

func PeerManagerInstance

func PeerManagerInstance() *PeerManager

func (*PeerManager) AddPeer

func (pm *PeerManager) AddPeer(peerType PeerType, peerPubKeyHash string) *Peer

func (*PeerManager) DebugPrint

func (pm *PeerManager) DebugPrint()

func (*PeerManager) GetPeer

func (pm *PeerManager) GetPeer(peerPubKeyHash string) (*Peer, error)

func (*PeerManager) GetPeerOfType

func (pm *PeerManager) GetPeerOfType(peerType PeerType, peerPubKeyHash string) (*Peer, error)

func (*PeerManager) IsPeer

func (pm *PeerManager) IsPeer(peerPubKeyHash string) bool

func (*PeerManager) RemovePeer

func (pm *PeerManager) RemovePeer(peerPubKeyHash string)

func (*PeerManager) UpdatePeer

func (pm *PeerManager) UpdatePeer(peerPubKeyHash string, ip string)

type PeerType

type PeerType int
const (
	SERVICE_PEER PeerType = iota
	EDGE_PEER
)

Jump to

Keyboard shortcuts

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