agent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NatsTimeout     = time.Second * 5
	NatsLongTimeout = time.Second * 15
)
View Source
const Agent = "agent"

Variables

View Source
var (
	Config Configuration

	//errors
	ErrNetNotMapped = errors.New("network not mapped to server")
	ErrConnected    = errors.New("network connected")
)

Functions

func ConnectToAgentBroker

func ConnectToAgentBroker() (*nats.EncodedConn, error)

func Run

func Run()

Types

type Configuration

type Configuration struct {
	NatsPort  int
	Verbosity string
}

type Device

type Device struct {
	plexus.Peer
	WGPrivateKey string
	Seed         string
	Server       string
}

type LeaveServerRequest

type LeaveServerRequest struct {
	Force bool
}

type Network

type Network struct {
	plexus.Network
	ListenPort       int
	PublicListenPort int
	Interface        string
	InterfaceSuffix  int
}

type StatusResponse

type StatusResponse struct {
	Server    string
	Connected bool
	Networks  []Network
}

Jump to

Keyboard shortcuts

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