discovery

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnNewPeer func(net.Conn, byte, uint64)

Functions

func Delete

func Delete(stype, addr string, peerid uint64)

Types

type Disc

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

func NewDiscovery

func NewDiscovery() *Disc

func (*Disc) SetInterestedServerType

func (d *Disc) SetInterestedServerType(servertypes []string)

func (*Disc) Start

func (d *Disc) Start()

func (*Disc) Stop

func (d *Disc) Stop()

func (*Disc) Update

func (d *Disc) Update()

func (*Disc) UploadServerInfo

func (d *Disc) UploadServerInfo(stype, addr string, peerid uint64) error

type DiscoverInfo

type DiscoverInfo struct {
	Addr     string `json:"addr"`
	PeerId   uint64 `json:"peerid"`
	PeerType byte   `json:"peertype`
}

Jump to

Keyboard shortcuts

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