13 lines
918 B
Go
13 lines
918 B
Go
package main
|
|
|
|
import "git.novox.be/novox/mesh-sdk/go/announce"
|
|
|
|
// Kept is every state this module keeps on the bus and whether other modules may read it (novox/hq ADR 0495 clause 2;
|
|
// issue 1790): the module says it itself, from its code, before it serves, and a reader is granted what it said
|
|
// (clause 3). A state is readable when another module's manifest reads it (keeps_test.go names the readers). keeps_test.go holds the list to the
|
|
// manifest's `state`, and keeps_integration_test.go that the module announces it on a bus.
|
|
var Kept = []announce.State{{Name: "asks", Readable: true}, {Name: "deliveries"}, {Name: "groups"}, {Name: "merges", Readable: true}, {Name: "owed", Readable: true}, {Name: "pulls", Readable: true}, {Name: "source", Readable: true}}
|
|
|
|
// announceKept says Kept through keeps, which is stdio.Keeps.
|
|
func announceKept(keeps func(...announce.State) error) error { return keeps(Kept...) }
|