mirror of
https://github.com/KumoCorp/kumomta.git
synced 2026-08-18 16:01:07 +00:00
f7e68070d1
This commit adds a background task that periodically evaluates a glob expression that defaults to the recommended configuration location and filename suffixes, and a set of additional paths to observe. Whenever the hash of that combined set of files changes it causes the ConfigEpoch to increment and broadcast to subscribers that the configuration has changed in some fashion. The QueueConfig struct has a new refresh_strategy which can select between the earlier Ttl based refresh for the queue config, or the new Epoch refresh. When the epoch changes, the config refresh task will cause each of the scheduled queues that is using the Epoch strategy to re-evaluate the get_queue_config event to update their configuration. The queues helper sets the refresh strategy to Epoch. A new HTTP endpoint has been added: it can force a bump in the current epoch, effectively causing all epoch subscribers to wake up and perform a refresh. These changes avoid doing O(number-of-scheduled-queues) get_queue_config callouts every refresh_interval; instead, the work is performed only when an appropriate change is detected or triggered.
85 lines
2.0 KiB
JSON
85 lines
2.0 KiB
JSON
{
|
|
"openapi": "3.0.3",
|
|
"info": {
|
|
"title": "tsa-daemon",
|
|
"description": "",
|
|
"license": {
|
|
"name": "Apache-2.0"
|
|
},
|
|
"version": "2024.08.25-22edf4ae"
|
|
},
|
|
"paths": {
|
|
"/api/admin/bump-config-epoch": {
|
|
"post": {
|
|
"tags": [
|
|
"config"
|
|
],
|
|
"summary": "Allows the system operator to trigger a configuration epoch bump,",
|
|
"description": "which causes various configs that are using the Epoch strategy to\nbe re-evaluated by triggering the appropriate callbacks.",
|
|
"operationId": "bump_config_epoch",
|
|
"responses": {
|
|
"200": {
|
|
"description": "bump successful"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/admin/set_diagnostic_log_filter/v1": {
|
|
"post": {
|
|
"tags": [
|
|
"logging"
|
|
],
|
|
"summary": "Changes the diagnostic log filter dynamically.",
|
|
"description": "See <https://docs.kumomta.com/reference/kumo/set_diagnostic_log_filter/>\nfor more information on diagnostic log filters.",
|
|
"operationId": "set_diagnostic_log_filter_v1",
|
|
"requestBody": {
|
|
"description": "",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SetDiagnosticFilterRequest"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Diagnostic level set successfully"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"SetDiagnosticFilterRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"filter"
|
|
],
|
|
"properties": {
|
|
"filter": {
|
|
"type": "string",
|
|
"description": "The diagnostic filter spec to use",
|
|
"example": "kumod=trace"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securitySchemes": {
|
|
"basic_auth": {
|
|
"type": "http",
|
|
"scheme": "basic"
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"basic_auth": [
|
|
""
|
|
]
|
|
}
|
|
]
|
|
}
|