minio reads who holds a seat through the placement client and the seat's state name, not go/delivery (B5e; ADR 0634 §1, §4; issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -12,11 +12,11 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
mesh "git.novox.be/novox/mesh-contracts/placement/go/seats/meshmoduleassigner"
|
||||
"os"
|
||||
|
||||
"git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshconditionsclient"
|
||||
stdio "git.novox.be/novox/mesh-sdk/go"
|
||||
"git.novox.be/novox/mesh-sdk/go/delivery"
|
||||
|
||||
"git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshhandactsclient"
|
||||
"git.novox.be/novox/mesh-sdk/go/views"
|
||||
@@ -31,9 +31,9 @@ const (
|
||||
|
||||
func main() {
|
||||
seats := &views.Reader{Module: "minio", Findings: meshconditionsclient.FindingWriter{State: stdio.State("findings")}, Acts: meshhandactsclient.Recorder{Ask: stdio.Ask}, Logf: func(f string, a ...any) { fmt.Fprintf(os.Stderr, "[object-store] "+f+"\n", a...) }}
|
||||
seats.Follow(delivery.AssignerModule, delivery.SeatHoldersState, SeatHoldersTool)
|
||||
seats.Follow(assignerModule, mesh.StateSeatHolders, SeatHoldersTool)
|
||||
s, err := newServer(os.Getenv(ConfigWord), os.Getenv(LinksWord), os.Getenv(ReceivesWord),
|
||||
func() (map[string][]byte, error) { return seats.Values(delivery.SeatHoldersRead) })
|
||||
func() (map[string][]byte, error) { return seats.Values(assignerModule + "." + mesh.StateSeatHolders) })
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "[object-store] %v\n", err)
|
||||
os.Exit(1)
|
||||
@@ -46,7 +46,11 @@ func main() {
|
||||
}
|
||||
|
||||
// SeatHoldersTool is the assigner's read tool of who holds which seat, which the manifest invokes (ADR 0615).
|
||||
const SeatHoldersTool = delivery.AssignerModule + ".assigner_read_seat_holders"
|
||||
// assignerModule is the holder of the seat mesh-module-assigner whose seat-holders view this module follows: the one name
|
||||
// of it here, the same as its manifest's `consumes` and `invokes` carry (the manifest test holds them equal).
|
||||
const assignerModule = "mesh-delivery-assigner"
|
||||
|
||||
const SeatHoldersTool = assignerModule + ".assigner_read_seat_holders"
|
||||
|
||||
func tools(s *server) []stdio.Tool {
|
||||
return []stdio.Tool{{
|
||||
|
||||
Reference in New Issue
Block a user