connector

package
v2.10.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-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 Connector

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

func New

func New(listenAddress string, finder Finder, onNodeHandler func(node *vnode.Node) bool, onConnectionHandler func(c *net.TCPConn, inbound bool)) *Connector

func (*Connector) ConnectNode

func (c *Connector) ConnectNode(node *vnode.Node) (err error)

func (*Connector) Start

func (c *Connector) Start() (err error)

type Finder

type Finder interface {
	Nodes() []*vnode.Node
}

Jump to

Keyboard shortcuts

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