node

package
v0.0.0-...-1959fcc Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StateConnecting represents the state of connecting to the peer
	StateConnecting connectionState = 1
	// StateEstablished represents the state of connection has been established
	StateEstablished connectionState = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

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

Node represents a local peer node of ZetaMesh

func New

func New(opt Options) *Node

New returns a new instance of local peer node

func (*Node) Start

func (n *Node) Start(ctx context.Context) error

Start starts the local peer and connect to the matcher

func (*Node) Stop

func (n *Node) Stop()

Stop stops the local peer and disconnect to the matcher

type Options

type Options struct {
	AuthOptions *security.AuthOptions

	Gateway string
	Key     string
	Address string
	TLS     bool
}

Options represents the CLI arguments of the Zetamesh peer node

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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