Refactor Archive to Cleanup and rename everything

This commit is contained in:
Aditya Ujeniya
2026-01-16 14:09:50 +01:00
parent 1d62ee1e22
commit 1a41629535
6 changed files with 78 additions and 48 deletions

View File

@@ -32,20 +32,32 @@ const configSchema = `{
},
"required": ["interval"]
},
"archive": {
"description": "Configuration for archiving the already checkpointed files.",
"cleanup": {
"description": "Configuration for the cleanup process.",
"type": "object",
"properties": {
"mode": {
"description": "The operation mode (e.g., 'archive' or 'delete').",
"type": "string",
"enum": ["archive", "delete"]
},
"interval": {
"description": "Interval at which the checkpointed files should be archived.",
"description": "Interval at which the cleanup runs.",
"type": "string"
},
"directory": {
"description": "Specify the directy in which the archived files should be placed.",
"description": "Target directory for operations.",
"type": "string"
}
},
"required": ["interval", "directory"]
"if": {
"properties": {
"mode": { "const": "archive" }
}
},
"then": {
"required": ["interval", "directory"]
}
},
"retention-in-memory": {
"description": "Keep the metrics within memory for given time interval. Retention for X hours, then the metrics would be freed.",