p2p

package
v0.0.0-...-daa1150 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRoutes

func GenerateRoutes(p2p *P2P) map[string]*utils.APIFunc

Types

type P2P

type P2P struct {
	service.BaseService
	// contains filtered or unexported fields
}

func NewP2P

func NewP2P() *P2P

func (*P2P) Broadcast

func (p2p *P2P) Broadcast(message services.P2PMessage) error

func (*P2P) HandlePeerFound

func (p2p *P2P) HandlePeerFound(pi peer.AddrInfo)

HandlePeerFound to be called when new peer is found

func (*P2P) Name

func (p2p *P2P) Name() string

func (*P2P) OnStart

func (p2p *P2P) OnStart() error

func (*P2P) OnStop

func (p2p *P2P) OnStop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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