node

package
v0.4.4 Latest Latest
Warning

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

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

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