Its states presence, pulse and stuck and its first views were named from the constant WatchmanModule; they are now `<cred.Module>_<state>` (watch.BucketsOf), and the watchman's stuck keys of presence take its own presence bucket's name. Builds: design 47 G A-296 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
36 lines
1.7 KiB
Go
36 lines
1.7 KiB
Go
package watch
|
|
|
|
import (
|
|
meshwatchdogs "git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshwatchdogs"
|
|
)
|
|
|
|
// The holders and buckets the watchman names, taken from its own manifest (module.json: its name, its `reads`, its
|
|
// states and the tools it invokes) and the seats' state names; a unit row checks them against it (TestManifestStateAndReads).
|
|
// No contract names a holder (novox/hq ADR 0625 §4, ADR 0634 §1).
|
|
const (
|
|
WatchmanModule = "mesh-delivery-watchman"
|
|
AssignerModule = "mesh-delivery-assigner"
|
|
// ProvisionsBucket is the seat mesh-provisioner's state provisions (reads: mesh-provisioner.provisions).
|
|
ProvisionsBucket = "mesh-provisioner_provisions"
|
|
// IndexerModule is the holder of the seat mesh-catalog, named from this module's manifest (consumes and invokes of mesh-delivery-indexer).
|
|
IndexerModule = "mesh-delivery-indexer"
|
|
|
|
// AssignerWantsBucket is the assigner's state wants, followed by its views family (consumes: mesh-delivery-assigner.views.wants).
|
|
AssignerWantsBucket = AssignerModule + "_wants"
|
|
)
|
|
|
|
// OwnBuckets are the watchman's own states of the seat mesh-watchdogs, `<module>_<state>`.
|
|
type OwnBuckets struct{ Presence, Pulse, Stuck string }
|
|
|
|
// BucketsOf names the watchman's own buckets from module, its credential's, never a constant (design 47 G A-296).
|
|
func BucketsOf(module string) OwnBuckets {
|
|
return OwnBuckets{Presence: module + "_" + meshwatchdogs.StatePresence, Pulse: module + "_" + meshwatchdogs.StatePulse,
|
|
Stuck: module + "_" + meshwatchdogs.StateStuck}
|
|
}
|
|
|
|
// The findings a value of another part is raised as, named by their words.
|
|
const (
|
|
FindingManifestOutgrown = "manifest-outgrown"
|
|
FindingNodeAccountFallback = "node-account-fallback"
|
|
)
|