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

Multiple Resolver #61

Open
husseinraoouf opened this issue Nov 29, 2022 · 0 comments
Open

Multiple Resolver #61

husseinraoouf opened this issue Nov 29, 2022 · 0 comments

Comments

@husseinraoouf
Copy link

First thank you for all the effort you put on the library

Feature Request

make the resolvers property in IConfigOptions take an array, so the user can use multiple resolvers

Use Case

I am using this library to configure one of our services, and our configurations come from 3 places ( json files, vault and env )

but we want to resolve the config at init and never use await config().get(), since we know that the config won't change at runtime ( we restart the service when we change the config in any one of the three places )

so we made a custom vaultResolver that get all the values from vault in init function and custom envResolver also to get all the envs with prefix in the init function, but we can't use the two resolvers at the same time

Note: I know i can pass one of them as remote resolver and the other as secret resolver but i don't think this is the right way, I think it is better to take array of resolvers also to support more than 2 resolvers at the same time

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

1 participant