p2p

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: ISC Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomBootPeers []multiaddr.Multiaddr

Custom boot node list

View Source
var DefaultBootPeers []multiaddr.Multiaddr

Default boot node list

Functions

func IsBootPeers

func IsBootPeers(id peer.ID) bool

func NewP2PHost

func NewP2PHost(private *secp256k1.PrivateKey, ip, port, external string) (core.Host, error)

func PrivateToP2pId

func PrivateToP2pId(key private.IPrivate) (peer.ID, error)

Types

type P2p

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

func NewBoot

func NewBoot(ip, port, external string, private *secp256k1.PrivateKey) (*P2p, error)

func NewP2p

func NewP2p(ps *peers.Peers, reqHandler request.IRequestHandler) (*P2p, error)

func (*P2p) Addr

func (p *P2p) Addr() string

func (*P2p) ID

func (p *P2p) ID() string

func (*P2p) Info

func (p *P2p) Info() map[string]interface{}

func (*P2p) Name

func (p *P2p) Name() string

func (*P2p) Start

func (p *P2p) Start() error

func (*P2p) StartBoot

func (p *P2p) StartBoot() error

func (*P2p) Stop

func (p *P2p) Stop() error

Jump to

Keyboard shortcuts

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