2023-10-05 18:48:54 +02:00
|
|
|
package crdt
|
|
|
|
|
2023-10-20 18:35:02 +02:00
|
|
|
import "github.com/automerge/automerge-go"
|
|
|
|
|
2023-10-05 18:48:54 +02:00
|
|
|
type MeshNodeCrdt struct {
|
2023-10-21 19:08:45 +02:00
|
|
|
HostEndpoint string `automerge:"hostEndpoint"`
|
|
|
|
WgEndpoint string `automerge:"wgEndpoint"`
|
|
|
|
PublicKey string `automerge:"publicKey"`
|
|
|
|
WgHost string `automerge:"wgHost"`
|
2023-10-24 17:00:46 +02:00
|
|
|
Timestamp int64 `automerge:"timestamp"`
|
2023-10-21 19:08:45 +02:00
|
|
|
FailedMap *automerge.Map `automerge:"failedMap"`
|
2023-10-05 18:48:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type MeshCrdt struct {
|
|
|
|
Nodes map[string]MeshNodeCrdt `automerge:"nodes"`
|
|
|
|
}
|