mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-08-12 22:47:10 +02:00
Added ability to query the JSON data store
This commit is contained in:
@ -4,13 +4,12 @@ import (
|
||||
"github.com/tim-beatham/wgmesh/pkg/conf"
|
||||
"github.com/tim-beatham/wgmesh/pkg/conn"
|
||||
"github.com/tim-beatham/wgmesh/pkg/mesh"
|
||||
"github.com/tim-beatham/wgmesh/pkg/query"
|
||||
"golang.zx2c4.com/wireguard/wgctrl"
|
||||
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
|
||||
)
|
||||
|
||||
/*
|
||||
* Represents a WireGuard node
|
||||
*/
|
||||
// Represents a WireGuard MeshNode
|
||||
type MeshNode struct {
|
||||
HostEndpoint string
|
||||
WgEndpoint string
|
||||
@ -20,19 +19,18 @@ type MeshNode struct {
|
||||
Routes []string
|
||||
}
|
||||
|
||||
// Represents a WireGuard Mesh
|
||||
type Mesh struct {
|
||||
SharedKey *wgtypes.Key
|
||||
Nodes map[string]MeshNode
|
||||
}
|
||||
|
||||
/*
|
||||
* Defines the mesh control server this node
|
||||
* is running
|
||||
*/
|
||||
// Represents a ctrlserver to be used in WireGuard
|
||||
type MeshCtrlServer struct {
|
||||
Client *wgctrl.Client
|
||||
MeshManager *mesh.MeshManager
|
||||
ConnectionManager conn.ConnectionManager
|
||||
ConnectionServer *conn.ConnectionServer
|
||||
Conf *conf.WgMeshConfiguration
|
||||
Querier query.Querier
|
||||
}
|
||||
|
Reference in New Issue
Block a user