Remove config groups

Refactor away the config group concept and simplyfy the way config
fields are defined.  Fields are defined directly as properties of the
static field fieldDefinitions on the class itself with a separate
interface to declare the types of fields.

This makes it possible to easily make accessing the config fields type
checked in a way that lets plugins extend the interfaces with their own
config options by adding additional fields to the interface via
declation merging.
This commit is contained in:
Hornwitser committed 2024-01-09 02:19:07 +01:00
1 parent 96210373f3
commit e74065a493
35 files changed
+1259 -2090

No files matched your search

+1 -1
View File
@@ -109,7 +109,7 @@ export class InstancePlugin extends BaseInstancePlugin {
// take a long time for the command to go through if the command
// stream is overloaded. Should the timeout be exceeded the
// previous values for the metrics will end up being sent to controller.
let timeout = this.instance.config.get("statistics_exporter.command_timeout") as number * 1000;
let timeout = this.instance.config.get("statistics_exporter.command_timeout") * 1000;
await lib.timeout(this.gatherMetrics(), timeout, undefined);
}
}