Module state is hq ADR 0202: 0201 landed first for a provider's derivations

This commit is contained in:
jochen
2026-10-04 03:44:51 +02:00
parent 328550f920
commit 70ff0f84af
9 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -579,7 +579,7 @@ func (b *moduleBus) Subscribe(deliver func(json.RawMessage) error) error {
return nil
}
// stateAsked is what a bundle names when it reaches its state (ADR 0201): the state by the name its
// stateAsked is what a bundle names when it reaches its state (ADR 0202): the state by the name its
// module uses, a key, and for a put the value.
type stateAsked struct {
State string `json:"state"`
@@ -587,7 +587,7 @@ type stateAsked struct {
Value json.RawMessage `json:"value"`
}
// State answers a bundle's `get`, `put`, `delete` and `keys` on its module's state (ADR 0201). The
// State answers a bundle's `get`, `put`, `delete` and `keys` on its module's state (ADR 0202). The
// runtime refuses, with the reason, a state the module was not issued and a write to one it only reads.
func (b *moduleBus) State(verb string, params json.RawMessage) (json.RawMessage, error) {
var asked stateAsked
@@ -629,7 +629,7 @@ func (b *moduleBus) State(verb string, params json.RawMessage) (json.RawMessage,
return json.Marshal(answer)
}
// Watch hands a bundle its module's state as it is and as it changes (ADR 0201): `{state, key}`, the
// Watch hands a bundle its module's state as it is and as it changes (ADR 0202): `{state, key}`, the
// key a pattern with `*` and `**`, empty for every key.
func (b *moduleBus) Watch(params json.RawMessage, deliver func(json.RawMessage) error) (func(), error) {
var asked stateAsked