Few refactorings of managing the mesh and a graph

visualisation tool for seeing the state of a mesh.
This commit is contained in:
Tim Beatham
2023-10-22 13:34:49 +01:00
parent c4dc984fc7
commit 360f9d3c54
11 changed files with 288 additions and 15 deletions

View File

@ -8,7 +8,7 @@ package ctrlserver
import (
"github.com/tim-beatham/wgmesh/pkg/conf"
"github.com/tim-beatham/wgmesh/pkg/conn"
"github.com/tim-beatham/wgmesh/pkg/manager"
"github.com/tim-beatham/wgmesh/pkg/mesh"
"github.com/tim-beatham/wgmesh/pkg/rpc"
"golang.zx2c4.com/wireguard/wgctrl"
)
@ -30,7 +30,7 @@ type NewCtrlServerParams struct {
func NewCtrlServer(params *NewCtrlServerParams) (*MeshCtrlServer, error) {
ctrlServer := new(MeshCtrlServer)
ctrlServer.Client = params.WgClient
ctrlServer.MeshManager = manager.NewMeshManager(*params.WgClient, *params.Conf)
ctrlServer.MeshManager = mesh.NewMeshManager(*params.WgClient, *params.Conf)
ctrlServer.Conf = params.Conf
connManagerParams := conn.NewJwtConnectionManagerParams{