-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
The run command body has grown too big, so it'd be better to chop it up into separate (utility) functions or so, so as to make it more robust and extensible. This refactoring should help with multi-config non-default directives. That are two approaches we can take:
- Consider using the
defaultconfig there's no other config directive defined. - Consider
defaultconfig a separate config entry and load the configuration alongside other directives.
I am more inclined towards the first options, as it seems more logical. The resulting config would look like this:
# first example
loggers:
default:
...
postgres:
...
mongo:
...
clients:
default:
...
postgres:
...
mongo:
...
pools:
default:
...
postgres:
...
mongo:
...
proxy:
default:
...
postgres:
...
mongo:
...
server:
default:
...
postgres:
...
mongo:
...
metrics:
default:
...
postgres:
...
mongo:
...This causes lots of duplication, but there can be one rule to fix it: if there's only a default directive for each top-level directive, it will be used for all the others. That is, if there is just one default logger, it'll be shared by all the servers, clients and other directives.
Related: #83.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
🎉 Done