SD-M2b: mesh-broker's events carry the binding and the verdict's revision (the lead's ruling, 12:4x)
The binding a module receives is one named type, Binding, the provision's form and each event's binding. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
+16
-10
@@ -47,6 +47,18 @@ export const recreatedSubject = "mesh.seat.mesh-broker.event.recreated";
|
||||
|
||||
export const droppedSubject = "mesh.seat.mesh-broker.event.dropped";
|
||||
|
||||
/** the binding a module receives in its membership for one entry (ADR 0595 §1, §7) */
|
||||
export interface Binding {
|
||||
/** the entry's name on the bus */
|
||||
"bus-name": string;
|
||||
/** how the bus keeps it */
|
||||
"storage-type": string;
|
||||
/** its subjects, for a stream */
|
||||
"subjects"?: string[];
|
||||
/** its template */
|
||||
"template"?: string;
|
||||
}
|
||||
|
||||
/** one piece of bus state as a manifest asks it */
|
||||
export interface Entry {
|
||||
/** its own configuration, where no template fits */
|
||||
@@ -104,6 +116,7 @@ export interface Named {
|
||||
export interface Said {
|
||||
/** the settings asked */
|
||||
"asked"?: Record<string, unknown>;
|
||||
"binding"?: Binding;
|
||||
/** its name on the bus */
|
||||
"bus-name": string;
|
||||
/** its own configuration, where no template fits */
|
||||
@@ -117,6 +130,8 @@ export interface Said {
|
||||
"module": string;
|
||||
/** the template's options the module set, within their bounds */
|
||||
"options"?: Record<string, unknown>;
|
||||
/** the indexer's revision of the verdict the bus module acted on (ADR 0622 §2), so a reader orders what it hears */
|
||||
"revision"?: number;
|
||||
/** the stream snapshot taken before a recreate or drop */
|
||||
"snapshot"?: string;
|
||||
/** how the bus keeps it */
|
||||
@@ -248,14 +263,5 @@ export type RecreatedEvent = Said;
|
||||
export type DroppedEvent = Said;
|
||||
|
||||
/** is the form of the provision bus-state. */
|
||||
export interface BusStateForm {
|
||||
/** the entry's name on the bus */
|
||||
"bus-name": string;
|
||||
/** how the bus keeps it */
|
||||
"storage-type": string;
|
||||
/** its subjects, for a stream */
|
||||
"subjects"?: string[];
|
||||
/** its template */
|
||||
"template"?: string;
|
||||
}
|
||||
export type BusStateForm = Binding;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user