mesh-broker's Binding is the wire form and Held carries it, so list, show and orphans answer the binding
The seat's Binding takes the fields the events carry and the membership holds (local, storage, template, stream, subject, bucket, object-store, history, state, indexes, snapshot, types): one form in the events, in list, show and orphans. Held gains binding, present on an entry the bus holds. Definition, fixture and generated Go and TypeScript contract. Builds: design 25 bindings-first-view §2, §7 (hq d0760629, PR 543) Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -22,6 +22,31 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "created with a ledger's binding as the bus module writes it",
|
||||
"of": "event:created",
|
||||
"subject": "mesh.seat.mesh-broker.event.created",
|
||||
"given": {
|
||||
"module": "mesh-knowledge",
|
||||
"local-name": "ledger",
|
||||
"storage-type": "ledger",
|
||||
"template": "ledger",
|
||||
"bus-name": "mesh-knowledge_ledger",
|
||||
"binding": {
|
||||
"local": "ledger",
|
||||
"storage": "ledger",
|
||||
"template": "ledger",
|
||||
"subject": "mesh.bus.mesh-knowledge.ledger",
|
||||
"history": "mesh-knowledge_ledger",
|
||||
"state": "mesh-knowledge_ledger_state",
|
||||
"indexes": {
|
||||
"by-kind": "mesh-knowledge_ledger_state_index-by-kind"
|
||||
},
|
||||
"snapshot": "mesh.bus.mesh-knowledge.ledger-snapshot"
|
||||
},
|
||||
"revision": 7
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "refused on the seat's subject",
|
||||
"of": "event:refused",
|
||||
|
||||
@@ -47,5 +47,39 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "list answers the binding of an entry the bus holds",
|
||||
"of": "verb:list.answer",
|
||||
"given": {
|
||||
"entries": [
|
||||
{
|
||||
"module": "mesh-knowledge",
|
||||
"local-name": "ledger",
|
||||
"storage-type": "ledger",
|
||||
"template": "ledger",
|
||||
"bus-name": "mesh-knowledge_ledger",
|
||||
"settings": {
|
||||
"max-mib": 64
|
||||
},
|
||||
"fill": {
|
||||
"count": 10,
|
||||
"bytes": 2048,
|
||||
"cap": 67108864
|
||||
},
|
||||
"binding": {
|
||||
"local": "ledger",
|
||||
"storage": "ledger",
|
||||
"template": "ledger",
|
||||
"history": "mesh-knowledge_ledger",
|
||||
"state": "mesh-knowledge_ledger_state",
|
||||
"indexes": {
|
||||
"by-kind": "mesh-knowledge_ledger_index-by-kind"
|
||||
},
|
||||
"snapshot": "mesh-knowledge_ledger.snapshot"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
+50
-11
@@ -403,6 +403,10 @@
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why it is in its state, in plain words; empty when held as asked"
|
||||
},
|
||||
"binding": {
|
||||
"$ref": "#/defs/Binding",
|
||||
"description": "the binding a module receives for the entry, as created and recreated carry it; present on an entry whose objects the bus holds, absent on one it does not (design 25 bindings-first-view §2)"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -540,31 +544,66 @@
|
||||
"Binding": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bus-name": {
|
||||
"local": {
|
||||
"type": "string",
|
||||
"description": "the entry's name on the bus"
|
||||
"description": "the entry's local name in the module's manifest"
|
||||
},
|
||||
"storage-type": {
|
||||
"storage": {
|
||||
"type": "string",
|
||||
"description": "how the bus keeps it"
|
||||
"description": "how the bus keeps it: the entry's storage type"
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"description": "its template"
|
||||
},
|
||||
"subjects": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"stream": {
|
||||
"type": "string",
|
||||
"description": "a stream's name on the bus"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"description": "the subject a stream's messages are on; also a ledger's history's"
|
||||
},
|
||||
"bucket": {
|
||||
"type": "string",
|
||||
"description": "a key-value bucket's name"
|
||||
},
|
||||
"object-store": {
|
||||
"type": "string",
|
||||
"description": "an object store's name"
|
||||
},
|
||||
"history": {
|
||||
"type": "string",
|
||||
"description": "a ledger's history stream"
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "a ledger's state bucket"
|
||||
},
|
||||
"indexes": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "its subjects, for a stream"
|
||||
"description": "a ledger's index buckets, by index name"
|
||||
},
|
||||
"snapshot": {
|
||||
"type": "string",
|
||||
"description": "the subject of a ledger's instances' snapshots"
|
||||
},
|
||||
"types": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object"
|
||||
},
|
||||
"description": "a ledger's types, as its manifest declares them"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"bus-name",
|
||||
"storage-type"
|
||||
"local",
|
||||
"storage"
|
||||
],
|
||||
"description": "the binding a module receives in its membership for one entry (ADR 0595 §1, §7)"
|
||||
"description": "the binding a module receives in its membership for one entry (ADR 0595 §1, §7): the names on the bus of the entry's objects, one form in the events, in list, show and orphans, and in the membership"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user