agent

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 32 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")
	ErrNotConnected = errors.New("not connected to server")
)

Functions

func ConnectToAgentBroker

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

func Request added in v0.3.0

func Request(conn *nats.Conn, subj string, request any, response any, timeout time.Duration) 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