A-112: the bus module's snapshots-cap and snapshot-keep-days are config values in a settings file the keeper reads at its start
Builds: design 47 G §633, §681, lead answer A-112 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -71,6 +71,20 @@
|
||||
"uses": [
|
||||
"operator-channel"
|
||||
],
|
||||
"config": {
|
||||
"snapshots-cap": {
|
||||
"type": "number",
|
||||
"description": "How many bytes the keeper's snapshots directory may hold (design 47 G §681): past 80 % of it the keeper tells a finding, and it never takes a snapshot past it. The keeper reads it at its start from its settings file.",
|
||||
"minimum": 1,
|
||||
"default": 21474836480
|
||||
},
|
||||
"snapshot-keep-days": {
|
||||
"type": "number",
|
||||
"description": "How many days a snapshot the keeper took before a drop or recreate, and its record, are kept (design 47 G §681, A-112). The keeper reads it at its start from its settings file; the tool nats_snapshots reads it as its configuration.",
|
||||
"minimum": 1,
|
||||
"default": 90
|
||||
}
|
||||
},
|
||||
"streams": [
|
||||
{
|
||||
"name": "broker-events",
|
||||
@@ -236,6 +250,20 @@
|
||||
"place": "mesh",
|
||||
"unknown": "program"
|
||||
},
|
||||
{
|
||||
"id": "keeper-settings",
|
||||
"trusted": false,
|
||||
"type": "file",
|
||||
"path": "${dir:keeper-state}/settings.json",
|
||||
"mode": "0600",
|
||||
"owner": "nats-keeper",
|
||||
"takes-config": [
|
||||
"snapshots-cap",
|
||||
"snapshot-keep-days"
|
||||
],
|
||||
"merge": "json",
|
||||
"template": "files/settings.json"
|
||||
},
|
||||
{
|
||||
"id": "server-conf",
|
||||
"type": "file",
|
||||
@@ -278,8 +306,6 @@
|
||||
"MESH_BROKER_FILE": "${dir:keeper-state}/broker-keeper",
|
||||
"MESH_NATS_FULL_RAISE": "75",
|
||||
"MESH_NATS_FULL_CLEAR": "70",
|
||||
"MESH_NATS_SNAPSHOTS_CAP": "21474836480",
|
||||
"MESH_NATS_SNAPSHOT_KEEP_DAYS": "90",
|
||||
"MESH_NATS_SNAPSHOTS_DIR": "${dir:keeper-state}"
|
||||
},
|
||||
"serves": [
|
||||
@@ -389,7 +415,6 @@
|
||||
"MESH_NATS_CONTAINER": "mesh-broker-nats",
|
||||
"MESH_NATS_USERS_FILE": "/etc/nats/accounts.conf",
|
||||
"MESH_NATS_SNAPSHOTS_DIR": "${dir:snapshots}",
|
||||
"MESH_NATS_SNAPSHOT_KEEP_DAYS": "90",
|
||||
"NATS_TOOLS_CREDENTIAL": "${dir:tools-secret}/broker-nats-tools"
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user