G findings: the view-only modules write their reader's findings through mesh-sdk's stdio writer
nfs-server, minio object-store, claude-code, mesh-watcher, mesh-provisioner and mesh-build-go hand their views reader views.WriterFindings over views.NewStdioWriter and start it; the removed meshconditionsclient.FindingWriter goes. Builds: design 47 G §686, §687, §689, A-3, A-16, A-17 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -22,8 +22,8 @@ import (
|
||||
"time"
|
||||
|
||||
"git.novox.be/novox/mesh-catalog/modules/disk-load/diskreadings"
|
||||
"git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshconditionsclient"
|
||||
"git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshhandactsclient"
|
||||
seat "git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshconditions"
|
||||
stdio "git.novox.be/novox/mesh-sdk/go"
|
||||
|
||||
"git.novox.be/novox/mesh-sdk/go/views"
|
||||
@@ -51,8 +51,22 @@ func main() {
|
||||
return
|
||||
}
|
||||
m := Here()
|
||||
w, err := views.NewStdioWriter(views.WriterConfig[seat.Finding, seat.FindingCleared, seat.FindingsStated, seat.FindingsAskedEvent]{
|
||||
Module: "nfs-server", State: stdio.State("findings"),
|
||||
Observe: func(context.Context) (views.Observed[seat.Finding], error) {
|
||||
return views.Observed[seat.Finding]{}, nil
|
||||
}})
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
seats.Findings = views.WriterFindings{Writer: w}
|
||||
seats.Follow(assignerModule, mesh.StateSeatHolders, SeatHoldersTool)
|
||||
seats.Start(context.Background())
|
||||
if err := w.Start(context.Background()); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
go ShareExports(m)
|
||||
if err := stdio.Serve("", append(Tools(m), seats.Tools("nfs_server")...)); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
@@ -132,7 +146,7 @@ const SeatHoldersTool = assignerModule + ".assigner_read_seat_holders"
|
||||
|
||||
// seats is the picture of the assignments seat's state of who holds which seat: asked of the assigner once and followed by
|
||||
// its events, never read from its state (ADR 0615).
|
||||
var seats = &views.Reader{Module: "nfs-server", Findings: meshconditionsclient.FindingWriter{State: stdio.State("findings")}, Acts: meshhandactsclient.Recorder{Ask: stdio.Ask}, Logf: func(f string, a ...any) { fmt.Fprintf(os.Stderr, "nfs-server: "+f+"\n", a...) }}
|
||||
var seats = &views.Reader{Module: "nfs-server", Acts: meshhandactsclient.Recorder{Ask: stdio.Ask}, Logf: func(f string, a ...any) { fmt.Fprintf(os.Stderr, "nfs-server: "+f+"\n", a...) }}
|
||||
|
||||
// seatHolderKeys is the assignments seat's state of who holds which seat, every key.
|
||||
func seatHolderKeys() (map[string][]byte, error) {
|
||||
|
||||
Reference in New Issue
Block a user