refactor(server/config): Implement checked access to server configuration, decoupled from SessionManager
#4170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit introduces a new
ServerConfiguration
handler object whichduty is to deal with all the handling of the configuration options the
servers are started with. Previously, this was done by
SessionManager
since a5119f0 (#1249) introduced
non-authentication-related configuration options into the previously
authentication-only configuration file.
The new infrastructure aims to offer a generally user-friendly and more
type-safe way of dealing with configuration options in various parts of
the
server
package. Options are registered simply akin to addingoptions to an
argparse
parser.Moved the logic of finding or creating an example server config to the
new class.
The first option,
worker_processes
has already been refactored intobeing handled by the new instance, but there are more to follow...