1
0
forked from extern/smegmesh
smegmesh/pkg/automerge/types.go
2023-10-26 16:53:12 +01:00

17 lines
588 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"`
}
// MeshCrdt: Represents the mesh network as a whole
type MeshCrdt struct {
Nodes map[string]MeshNodeCrdt `automerge:"nodes"`
}