Refactored client and server and interfaced out dependencies

This commit is contained in:
Tim Beatham
2023-10-02 16:03:41 +01:00
parent 52e5e3d33c
commit a069b89a9a
15 changed files with 426 additions and 203 deletions

View File

@ -1,7 +1,6 @@
package ctrlserver
import (
"github.com/tim-beatham/wgmesh/pkg/auth"
"github.com/tim-beatham/wgmesh/pkg/conn"
"golang.zx2c4.com/wireguard/wgctrl"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
@ -27,10 +26,9 @@ type Mesh struct {
* is running
*/
type MeshCtrlServer struct {
Client *wgctrl.Client
Meshes map[string]Mesh
IfName string
Conn *conn.WgCtrlConnection
JwtManager *auth.JwtManager
TokenManager *auth.TokenManager
Client *wgctrl.Client
Meshes map[string]Mesh
IfName string
ConnectionManager *conn.ConnectionManager
ConnectionServer *conn.ConnectionServer
}