M-class (watchman): class core, the finding stream at 8 MiB
It claims a seat, so its class is core; its finding stream keeps 7 days at 8 MiB, not 16. Builds: design 47 H2 §810, §814, §820; H-A-394 (1)
This commit is contained in:
@@ -53,6 +53,7 @@ type manifest struct {
|
||||
Tools []string `json:"tools"`
|
||||
Moved bool `json:"moved"`
|
||||
Version string `json:"version"`
|
||||
Class string `json:"class"`
|
||||
Slug string `json:"slug"`
|
||||
Reads []string `json:"reads"`
|
||||
Consumes []string `json:"consumes"`
|
||||
@@ -103,6 +104,10 @@ func TestManifestStateAndReads(t *testing.T) { // 1135/AC6
|
||||
if m.Module != "mesh-delivery-watchman" || m.Moved || m.Slug != "watchman" {
|
||||
t.Errorf("module %q moved %v (it has no template, so it is not moved) slug %q", m.Module, m.Moved, m.Slug)
|
||||
}
|
||||
// design 47 H2 §810, §814; H-A-394 (1): it claims a seat, so its class is core.
|
||||
if m.Class != "core" {
|
||||
t.Errorf("class = %q, want core", m.Class)
|
||||
}
|
||||
want := []state{{Name: "presence", History: 20}, {Name: "pulse", KeyTTL: true}, {Name: "stuck", History: 20}, {Name: "first-views", History: 1}}
|
||||
if !reflect.DeepEqual(m.State, want) {
|
||||
t.Errorf("state = %+v, want %+v", m.State, want)
|
||||
@@ -301,11 +306,11 @@ type require struct {
|
||||
}
|
||||
|
||||
// findingRequires is the findings state and the finding stream a module asks for by their templates (design 47 G
|
||||
// §383, §387; A-30): 7 days and 16 MiB, the findings state keeping the given history.
|
||||
// §383, §387; A-30): 7 days and 8 MiB (design 47 H2 §820), the findings state keeping the given history.
|
||||
func findingRequires(history float64) []require {
|
||||
return []require{
|
||||
{Name: "findings", Storage: "key-value", Template: "state", Options: map[string]any{"history": history}},
|
||||
{Name: "finding-events", Storage: "stream", Template: "events", Options: map[string]any{
|
||||
"events": []any{"finding-written.*", "finding-cleared.*", "findings-stated.*"}, "max-age-days": float64(7), "max-mib": float64(16)}},
|
||||
"events": []any{"finding-written.*", "finding-cleared.*", "findings-stated.*"}, "max-age-days": float64(7), "max-mib": float64(8)}},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"module": "mesh-delivery-watchman",
|
||||
"version": "0.1",
|
||||
"class": "core",
|
||||
"slug": "watchman",
|
||||
"claims": [
|
||||
{
|
||||
@@ -203,7 +204,7 @@
|
||||
"findings-stated.*"
|
||||
],
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
"max-mib": 8
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user