mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-08-09 21:27:33 +02:00
Incorporated gin server.
Each node communicates in the mesh
This commit is contained in:
24
pkg/ctrlserver/ctrltypes.go
Normal file
24
pkg/ctrlserver/ctrltypes.go
Normal file
@ -0,0 +1,24 @@
|
||||
package ctrlserver
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
/*
|
||||
* Represents a WireGuard node
|
||||
*/
|
||||
type MeshNode struct {
|
||||
Host string
|
||||
CtrlPort string
|
||||
WgPort string
|
||||
WgHost string
|
||||
GinServer gin.Engine
|
||||
}
|
||||
|
||||
/*
|
||||
* Defines the mesh control server this node
|
||||
* is running
|
||||
*/
|
||||
type MeshCtrlServer struct {
|
||||
Host string
|
||||
Port int
|
||||
Meshes map[string]MeshNode
|
||||
}
|
Reference in New Issue
Block a user