Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal Feature: Single, global CONFIG instance #297

Open
4 tasks
Tokarak opened this issue Oct 20, 2024 · 0 comments
Open
4 tasks

Internal Feature: Single, global CONFIG instance #297

Tokarak opened this issue Oct 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Tokarak
Copy link
Contributor

Tokarak commented Oct 20, 2024

Right now, it is difficult to transfer variables (i.e config values) between modules. It would be nice to have a single, extendable, immutable instance of a Config struct which is filled out (in order) from defaults, config file, environment, and command-line flags; and is accessible globally from any module. This in fact is, I believe, the standard deserialisation pattern of Clap.

  • Migrate to Clap deserialisation pattern
  • Combine all runtime config from all sources into a single struct
    The following could follow
  • Refactor instance_info to be generated programmatically
    • Distinguish "public" config values which should be displayed from "internal" ones (such as listening address and port)
@Tokarak Tokarak added the enhancement New feature or request label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant