diff --git a/docs/reference.md b/docs/reference.md index 4954db7..05efa24 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -26,6 +26,8 @@ rather than repeated. | `queue_capacity_per_band` | `int` | [Admission](#admission) | | `queue_capacity_total` | `int` | [Admission](#admission) | | `interval` | `time.Duration` | [Admission](#admission) | +| `default` | `map[string]any` | [AgentSettings](#agentsettings) | +| `nodes` | `map[string]map[string]any` | [AgentSettings](#agentsettings) | | `enabled` | `bool` | [Auth](#auth) | | `store` | `string` | [Auth](#auth) | | `cache_ttl` | `time.Duration` | [Auth](#auth) | @@ -470,6 +472,21 @@ Zero takes half of all the bands' capacities together. `time.Duration` +## AgentSettings + +### `default` + +`map[string]any` + +Default is agent.yaml's keys for every node. + +### `nodes` + +`map[string]map[string]any` + +Nodes are agent.yaml's keys for one node each, by node id, over +Default. + ## Auth ### `enabled` @@ -2531,6 +2548,8 @@ agent needs to start, for every node (default) and for one settings changed starts again on them, its engines serving throughout. +Takes a [AgentSettings](#agentsettings) block. + ### `firewall_networks` `[]string` diff --git a/internal/docgen/reference_gen.go b/internal/docgen/reference_gen.go index 523ce27..d5978b5 100644 --- a/internal/docgen/reference_gen.go +++ b/internal/docgen/reference_gen.go @@ -19,6 +19,10 @@ var Reference = []Block{ {Key: "queue_capacity_total", Type: "int", Doc: "QueueCapacityTotal bounds everything queued across bands. Reached, a\nrequest is not refused while a lower band has any queued: the newest of\nthe lowest band is turned away instead, with a 503 and Retry-After.\nZero takes half of all the bands' capacities together.", Nested: ""}, {Key: "interval", Type: "time.Duration", Doc: "", Nested: ""}, }}, + {Package: "config", Name: "AgentSettings", Title: "AgentSettings", Doc: "", Fields: []Field{ + {Key: "default", Type: "map[string]any", Doc: "Default is agent.yaml's keys for every node.", Nested: ""}, + {Key: "nodes", Type: "map[string]map[string]any", Doc: "Nodes are agent.yaml's keys for one node each, by node id, over\nDefault.", Nested: ""}, + }}, {Package: "config", Name: "Auth", Title: "Auth", Doc: "", Fields: []Field{ {Key: "enabled", Type: "bool", Doc: "", Nested: ""}, {Key: "store", Type: "string", Doc: "Store is the SQLite file holding keys, tenancy and usage.", Nested: ""}, diff --git a/internal/docgen/render.go b/internal/docgen/render.go index 540feed..515b7be 100644 --- a/internal/docgen/render.go +++ b/internal/docgen/render.go @@ -32,6 +32,7 @@ var Sources = []string{ "internal/config/oidc.go", "internal/config/firewall.go", "internal/config/serving.go", + "internal/config/agents.go", "internal/mail/mail.go", "internal/notify/notify.go", "internal/secrets/secrets.go",