1
0
forked from extern/smegmesh
smegmesh/pkg/ctrlserver/ctrltypes.go

33 lines
494 B
Go
Raw Normal View History

package ctrlserver
2023-09-19 14:45:49 +02:00
import (
"golang.zx2c4.com/wireguard/wgctrl"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
/*
* Represents a WireGuard node
*/
type MeshNode struct {
2023-09-19 14:45:49 +02:00
Host string
CtrlPort string
WgPort string
WgHost string
}
type Mesh struct {
SharedKey *wgtypes.Key
Nodes map[string]MeshNode
}
/*
* Defines the mesh control server this node
* is running
*/
type MeshCtrlServer struct {
Host string
Port int
2023-09-19 14:45:49 +02:00
Client *wgctrl.Client
Meshes map[string]Mesh
}