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:
@@ -73,6 +73,18 @@ const SubjectRecreated = "mesh.seat.mesh-broker.event.recreated"
|
||||
// SubjectDropped is where dropped is published.
|
||||
const SubjectDropped = "mesh.seat.mesh-broker.event.dropped"
|
||||
|
||||
// Binding is the binding a module receives in its membership for one entry (ADR 0595 §1, §7).
|
||||
type Binding struct {
|
||||
// the entry's name on the bus
|
||||
BusName string `json:"bus-name"`
|
||||
// how the bus keeps it
|
||||
StorageType string `json:"storage-type"`
|
||||
// its subjects, for a stream
|
||||
Subjects []string `json:"subjects,omitempty"`
|
||||
// its template
|
||||
Template string `json:"template,omitempty"`
|
||||
}
|
||||
|
||||
// Entry is one piece of bus state as a manifest asks it.
|
||||
type Entry struct {
|
||||
// its own configuration, where no template fits
|
||||
@@ -131,7 +143,8 @@ type Named struct {
|
||||
// Said is the body of every event of the seat.
|
||||
type Said struct {
|
||||
// the settings asked
|
||||
Asked map[string]any `json:"asked,omitempty"`
|
||||
Asked map[string]any `json:"asked,omitempty"`
|
||||
Binding *Binding `json:"binding,omitempty"`
|
||||
// its name on the bus
|
||||
BusName string `json:"bus-name"`
|
||||
// its own configuration, where no template fits
|
||||
@@ -145,6 +158,8 @@ type Said struct {
|
||||
Module string `json:"module"`
|
||||
// the template's options the module set, within their bounds
|
||||
Options map[string]any `json:"options,omitempty"`
|
||||
// the indexer's revision of the verdict the bus module acted on (ADR 0622 §2), so a reader orders what it hears
|
||||
Revision int64 `json:"revision,omitempty"`
|
||||
// the stream snapshot taken before a recreate or drop
|
||||
Snapshot string `json:"snapshot,omitempty"`
|
||||
// how the bus keeps it
|
||||
@@ -278,13 +293,4 @@ type RecreatedEvent = Said
|
||||
type DroppedEvent = Said
|
||||
|
||||
// BusStateForm is the form of the provision bus-state.
|
||||
type BusStateForm struct {
|
||||
// the entry's name on the bus
|
||||
BusName string `json:"bus-name"`
|
||||
// how the bus keeps it
|
||||
StorageType string `json:"storage-type"`
|
||||
// its subjects, for a stream
|
||||
Subjects []string `json:"subjects,omitempty"`
|
||||
// its template
|
||||
Template string `json:"template,omitempty"`
|
||||
}
|
||||
type BusStateForm = Binding
|
||||
|
||||
Reference in New Issue
Block a user