diff --git a/modules/mesh-watcher/cmd/mesh-watcher/heartbeat.go b/modules/mesh-watcher/cmd/mesh-watcher/heartbeat.go index e34c4cbfd..2fdbb7a89 100644 --- a/modules/mesh-watcher/cmd/mesh-watcher/heartbeat.go +++ b/modules/mesh-watcher/cmd/mesh-watcher/heartbeat.go @@ -24,11 +24,11 @@ import ( "strings" "time" - "git.novox.be/novox/mesh-sdk/go/health" + meshselfcheck "git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshselfcheck" ) // HeartbeatEvent is the event's local name under the seat mesh-self-check. -const HeartbeatEvent = health.EventChecked +const HeartbeatEvent = meshselfcheck.EventChecked // Beat is one heartbeat. type Beat struct { @@ -39,7 +39,7 @@ type Beat struct { } // isHeartbeat says whether an envelope's key is the self-check's heartbeat. -func isHeartbeat(key string) bool { return key == health.SelfCheckModule+"."+HeartbeatEvent } +func isHeartbeat(key string) bool { return key == meshselfcheck.Seat+"."+HeartbeatEvent } // DecodeBeat reads one heartbeat's body. func DecodeBeat(body []byte) (Beat, error) { diff --git a/modules/mesh-watcher/cmd/mesh-watcher/main.go b/modules/mesh-watcher/cmd/mesh-watcher/main.go index 79b516bcb..41e57b7c6 100644 --- a/modules/mesh-watcher/cmd/mesh-watcher/main.go +++ b/modules/mesh-watcher/cmd/mesh-watcher/main.go @@ -17,9 +17,9 @@ import ( "git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshconditionsclient" "git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshhandactsclient" + meshselfcheck "git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshselfcheck" stdio "git.novox.be/novox/mesh-sdk/go" "git.novox.be/novox/mesh-sdk/go/delivery" - "git.novox.be/novox/mesh-sdk/go/health" "git.novox.be/novox/mesh-sdk/go/views" ) @@ -121,7 +121,7 @@ func run(w *Watcher, l *listening, node string, placement *views.Reader) { } <-stdio.Served() // subscribed as soon as the runtime serves, never after a guessed wait: a heartbeat sent meanwhile is heard for wait := 2 * time.Second; ; wait = min(wait*2, time.Minute) { - err := stdio.Subscribe(health.SelfCheckModule+".*", handle) + err := stdio.Subscribe(meshselfcheck.Seat+".*", handle) if err == nil { l.set("listening") logf("[mesh-watcher] listening for the self-check's heartbeat; watching from %s", node) diff --git a/modules/mesh-watcher/go.mod b/modules/mesh-watcher/go.mod index cf36fac8e..e578d0d55 100644 --- a/modules/mesh-watcher/go.mod +++ b/modules/mesh-watcher/go.mod @@ -15,3 +15,5 @@ require ( golang.org/x/crypto v0.57.0 // indirect golang.org/x/sys v0.48.0 // indirect ) + +require git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshselfcheck v0.0.0-00010101000000-000000000000