node

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AlreadyConnectedRequest ...
	AlreadyConnectedRequest = iota + 1
	// InfoRequest ...
	InfoRequest
	// LDsRequest ...
	LDsRequest
	// PeerRequest ...
	PeerRequest
)

Variables

View Source
var ErrNoData = errors.New("no data respond")

ErrNoData ...

Functions

func ConnectNode

func ConnectNode(addr ma.Multiaddr, bind int, local core.SafeLocalData) (core.Node, error)

ConnectNode ...

func CoreNode

func CoreNode(conn net.Conn, local core.SafeLocalData) (core.Node, error)

CoreNode ...

func DialFromStringAddr

func DialFromStringAddr(addr string, bind int) (net.Conn, error)

DialFromStringAddr ...

func InitManager

func InitManager(cfg *config.Config) (core.NodeManager, error)

InitManager ...

func MultiDial

func MultiDial(addr ma.Multiaddr, bind int) (net.Conn, error)

MultiDial ...

Types

type Nodes

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

Nodes ...

func NewNodes

func NewNodes() *Nodes

NewNodes ...

func (Nodes) Marshal

func (n Nodes) Marshal() ([]byte, error)

Marshal ...

func (*Nodes) Unmarshal

func (n *Nodes) Unmarshal(bytes []byte) error

Unmarshal ...

Jump to

Keyboard shortcuts

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