node

package
v2.5.2-rc0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	NetworkType string
	Addr        string
}

Node is the root struct to embed the network identifier

func NewNode

func NewNode(n string, addr string) *Node

NewNode creates an instance of Peer

func NewTCPNode

func NewTCPNode(addr string) *Node

NewTCPNode creates an instance of Peer with tcp transportation

func (*Node) Network

func (n *Node) Network() string

Network returns the transportation layer type (tcp by default)

func (*Node) String

func (n *Node) String() string

String returns the network address (127.0.0.1:0 by default)

Jump to

Keyboard shortcuts

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