CAT-N1: the bus module's keeper, its own events stream, state and the seat's reading verbs in the manifest
The keeper is a process of the tools bundle on its own account (own secret broker-keeper, ADR 0436 §1): it hears the indexer's manifest-accepted, keeps what it heard in its old state asked and the persons' requests in requests (ADR 0595 §10), and says its nine events on its own stream broker-events, 30 days at 256 MiB (design 25 § 12.3, ADR 0620 §2). mesh-broker serves its four reading verbs; its acting verbs are the keeper's own work. The server gains a tcp check, which the keeper's tool check stands beside. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
+105
-6
@@ -24,14 +24,24 @@
|
||||
"claims": [
|
||||
{
|
||||
"name": "mesh-broker",
|
||||
"scope": "mesh"
|
||||
"scope": "mesh",
|
||||
"serves": [
|
||||
"list",
|
||||
"show",
|
||||
"check",
|
||||
"orphans"
|
||||
]
|
||||
}
|
||||
],
|
||||
"bus-users": "/var/lib/nats-module/conf/accounts.conf",
|
||||
"core-credentials": true,
|
||||
"own-secrets": {
|
||||
"broker": "${dir:mesh-state}/broker",
|
||||
"broker-nats-tools": "${dir:tools-secret}/broker-nats-tools"
|
||||
"broker-nats-tools": "${dir:tools-secret}/broker-nats-tools",
|
||||
"broker-keeper": {
|
||||
"path": "${dir:keeper-state}/broker-keeper",
|
||||
"owner": "nats-keeper"
|
||||
}
|
||||
},
|
||||
"capabilities": [
|
||||
"container-runtime"
|
||||
@@ -43,16 +53,51 @@
|
||||
"bucket-expiry-set"
|
||||
],
|
||||
"invokes": [
|
||||
"seat:mesh-hand-acts.hand-act"
|
||||
"seat:mesh-hand-acts.hand-act",
|
||||
"mesh-delivery-indexer.indexer_bus_state"
|
||||
],
|
||||
"consumes": [
|
||||
"mesh-delivery-indexer.manifest-accepted"
|
||||
],
|
||||
"uses": [
|
||||
"operator-channel"
|
||||
],
|
||||
"streams": [
|
||||
{
|
||||
"name": "broker-events",
|
||||
"events": [
|
||||
"created",
|
||||
"refused",
|
||||
"drifted",
|
||||
"drift-cleared",
|
||||
"full",
|
||||
"full-cleared",
|
||||
"orphaned",
|
||||
"recreated",
|
||||
"dropped"
|
||||
],
|
||||
"max-age-days": 30,
|
||||
"max-mib": 256
|
||||
}
|
||||
],
|
||||
"state": [
|
||||
{
|
||||
"name": "asked",
|
||||
"history": 5
|
||||
},
|
||||
{
|
||||
"name": "requests",
|
||||
"history": 5,
|
||||
"ttl-seconds": 86400
|
||||
}
|
||||
],
|
||||
"consumes": [],
|
||||
"listens": [
|
||||
{
|
||||
"name": "bus",
|
||||
"port": 4222,
|
||||
"protocol": "tcp",
|
||||
"from": "mesh",
|
||||
"why": "the mesh bus — every link the mesh has, over TLS, reached across the overlay"
|
||||
"why": "the mesh bus \u2014 every link the mesh has, over TLS, reached across the overlay"
|
||||
}
|
||||
],
|
||||
"tools": [
|
||||
@@ -96,6 +141,13 @@
|
||||
]
|
||||
},
|
||||
"resources": [
|
||||
{
|
||||
"id": "keeper-account",
|
||||
"type": "user",
|
||||
"name": "nats-keeper",
|
||||
"shell": "/usr/bin/nologin",
|
||||
"home": "/var/lib/nats-keeper"
|
||||
},
|
||||
{
|
||||
"id": "jetstream-data",
|
||||
"type": "directory",
|
||||
@@ -117,6 +169,14 @@
|
||||
"mode": "0711",
|
||||
"unknown": "program"
|
||||
},
|
||||
{
|
||||
"id": "keeper-state",
|
||||
"type": "directory",
|
||||
"path": "/var/lib/nats-keeper",
|
||||
"mode": "0700",
|
||||
"owner": "nats-keeper",
|
||||
"unknown": "program"
|
||||
},
|
||||
{
|
||||
"id": "snapshots",
|
||||
"type": "directory",
|
||||
@@ -158,6 +218,41 @@
|
||||
"artifact": "entrypoint",
|
||||
"unknown": "program"
|
||||
},
|
||||
{
|
||||
"id": "keeper",
|
||||
"type": "process",
|
||||
"name": "nats-keeper",
|
||||
"artifact": "tools",
|
||||
"run": [
|
||||
"./nats-tools",
|
||||
"keep"
|
||||
],
|
||||
"user": "nats-keeper",
|
||||
"env": {
|
||||
"MESH_BROKER_FILE": "${dir:keeper-state}/broker-keeper",
|
||||
"MESH_NATS_FULL_RAISE": "75",
|
||||
"MESH_NATS_FULL_CLEAR": "70"
|
||||
},
|
||||
"bus": {
|
||||
"state": [
|
||||
"asked",
|
||||
"requests"
|
||||
],
|
||||
"asks": true,
|
||||
"invokes": [
|
||||
"mesh-delivery-indexer.indexer_bus_state",
|
||||
"seat:mesh-hand-acts.hand-act"
|
||||
]
|
||||
},
|
||||
"health": {
|
||||
"kind": "tool",
|
||||
"tool": "nats_keeper_health",
|
||||
"interval": "60s",
|
||||
"timeout": "10s",
|
||||
"looks": 2,
|
||||
"grace": "180s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "server",
|
||||
"type": "container",
|
||||
@@ -181,7 +276,11 @@
|
||||
"restart-on": [
|
||||
"program-snapshot",
|
||||
"program-entrypoint"
|
||||
]
|
||||
],
|
||||
"health": {
|
||||
"kind": "tcp",
|
||||
"endpoint": "bus"
|
||||
}
|
||||
}
|
||||
],
|
||||
"accesses": [
|
||||
|
||||
Reference in New Issue
Block a user