catdog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatDog

type CatDog struct {
	UDPv50 *dv50.UDPv5
	UDPv51 *dv51.UDPv5
	// contains filtered or unexported fields
}

func NewCatDog

func NewCatDog(connv50 gdv5.UDPConn, connv51 gdv5.UDPConn,
	ln50 *enode.LocalNode, ln51 *enode.LocalNode, cfg *CatDogConfig) (*CatDog, error)

func (*CatDog) OnSeenV50

func (cd *CatDog) OnSeenV50(n *enode.Node, at time.Time, liveness uint)

func (*CatDog) OnSeenV51

func (cd *CatDog) OnSeenV51(n *enode.Node, at time.Time, liveness uint)

func (*CatDog) Revalidate

func (cd *CatDog) Revalidate(n *enode.Node) (uint64, error)

type CatDogConfig

type CatDogConfig struct {
	PrivateKeyV50 *ecdsa.PrivateKey
	PrivateKeyV51 *ecdsa.PrivateKey

	// These settings are optional:
	NetRestrict  *netutil.Netlist   // network whitelist
	BootnodesV50 []*enode.Node      // list of bootstrap nodes
	BootnodesV51 []*enode.Node      // list of bootstrap nodes
	LogV50       log.Logger         // if set, log messages go here
	LogV51       log.Logger         // if set, log messages go here
	ValidSchemes enr.IdentityScheme // allowed identity schemes
}

Jump to

Keyboard shortcuts

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