D1 (enrolment): the integration bed reads the seat-form states at the seat list's holders
Builds: design 47 G A-210, A-128 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -112,8 +112,17 @@ type busReader struct {
|
||||
js jetstream.JetStream
|
||||
}
|
||||
|
||||
// bedHolders is the seat list of the bed: the vault and the node-engine each held by the module of the seat's name.
|
||||
func bedHolders(string, any) (json.RawMessage, error) {
|
||||
return json.RawMessage(`{"seats":[{"seat":"mesh-vault","holders":[{"module":"mesh-vault"}]},{"seat":"node-engine","holders":[{"module":"node-engine"}]}]}`), nil
|
||||
}
|
||||
|
||||
func (r busReader) bucket(state string) (jetstream.KeyValue, error) {
|
||||
return r.js.KeyValue(r.ctx, strings.Replace(state, ".", "_", 1))
|
||||
name, err := resolveState(bedHolders, state) // a state in the seat form is read at its seat's holder (A-210)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return r.js.KeyValue(r.ctx, strings.Replace(name, ".", "_", 1))
|
||||
}
|
||||
|
||||
func (r busReader) Keys(state string) ([]string, error) {
|
||||
|
||||
Reference in New Issue
Block a user