mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2024-12-13 18:11:25 +01:00
d462d95d6d
service they provide.
18 lines
651 B
Go
18 lines
651 B
Go
package crdt
|
|
|
|
// MeshNodeCrdt: Represents a CRDT for a mesh nodes
|
|
type MeshNodeCrdt struct {
|
|
HostEndpoint string `automerge:"hostEndpoint"`
|
|
WgEndpoint string `automerge:"wgEndpoint"`
|
|
PublicKey string `automerge:"publicKey"`
|
|
WgHost string `automerge:"wgHost"`
|
|
Timestamp int64 `automerge:"timestamp"`
|
|
Routes map[string]interface{} `automerge:"routes"`
|
|
Description string `automerge:"description"`
|
|
}
|
|
|
|
// MeshCrdt: Represents the mesh network as a whole
|
|
type MeshCrdt struct {
|
|
Nodes map[string]MeshNodeCrdt `automerge:"nodes"`
|
|
}
|