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

Support the configuration API for generic configuration providers #612

Open
Meir017 opened this issue Aug 26, 2024 · 2 comments
Open

Support the configuration API for generic configuration providers #612

Meir017 opened this issue Aug 26, 2024 · 2 comments

Comments

@Meir017
Copy link
Contributor

Meir017 commented Aug 26, 2024

Feature request type

enhancement

Is your feature request related to a problem? Please describe

Currently, when running the garnet server we must provider either command-line arguments or a garnet.conf JSON file.
By adopting the https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration we will be able to use any configuration provider and require less manual work for maintaining the Options file

Describe the solution you'd like

building on top of #579 we would call builder.Configuration.AddEnvironmentVariables(prefix: "GARNET_") (see https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration-providers#prefixes)

Describe alternatives you've considered

No response

Additional context

No response

@badrishc
Copy link
Contributor

This is a valid suggestion, but we were not able to do it in a way that ensure backwards compatibility with the switches. So went with garnet.conf.

@Meir017
Copy link
Contributor Author

Meir017 commented Aug 26, 2024

the Command-line configuration provider https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration-providers#command-line-configuration-provider almost matches the command-line arguments that exist today.

I think the command-line arguments can wait (still use the Options class) but adding support for environment-variables won't interfere with the current configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants