Say the heartbeat's interval, export the host's validator, grant the genesis controller Phase 1 (hq to-be 45)
The controller's watchdog of a machine's heartbeat (S1) is bound to three of its intervals, and a bound the controller guessed would not move when the interval does: the heartbeat now carries interval_seconds. Its self-check (D1) must judge every composed declaration as the host does, and a second validator written from the host's rules would drift from them: the host's own parsing is exported, unchanged, as github.com/novox/mesh-host/validate. The installer's first user list grants what the controller now composes for itself: its condition buckets, the condition and doctor-heartbeat events, the bus's two consumer advisories and $SRV.INFO — or the first controller would be refused them until the broker's machine is pushed.
This commit is contained in:
@@ -28,6 +28,10 @@ const (
|
||||
// look like a stale one.
|
||||
type Alive struct {
|
||||
Node string `json:"node"`
|
||||
// IntervalSeconds is how often this node says it is there (novox/hq to-be 45 §3, S1): the
|
||||
// controller's watchdog is bound to three of them, so the bound moves with the interval rather
|
||||
// than with a number the controller guessed. A controller older than that ignores it.
|
||||
IntervalSeconds int `json:"interval_seconds"`
|
||||
}
|
||||
|
||||
// Signed is a declaration and the signature over it.
|
||||
|
||||
@@ -514,7 +514,7 @@ func publishReport(ctx context.Context, bus Bus, m Membership, report Report,
|
||||
// publishAlive says this node is here, and nothing else.
|
||||
func publishAlive(ctx context.Context, bus Bus, m Membership, say Announce,
|
||||
timeout time.Duration) {
|
||||
body, err := json.Marshal(Alive{Node: m.Node})
|
||||
body, err := json.Marshal(Alive{Node: m.Node, IntervalSeconds: int(AliveEvery / time.Second)})
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user