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

Allow an integrator to provide a customized Stork instance #153

Open
mkouba opened this issue Nov 26, 2021 · 0 comments
Open

Allow an integrator to provide a customized Stork instance #153

mkouba opened this issue Nov 26, 2021 · 0 comments
Labels
enhancement Enhancements or Request for enhancement

Comments

@mkouba
Copy link

mkouba commented Nov 26, 2021

Currently, the only entrypoint for Stork is a singleton implemented as a static field and accessible via the io.smallrye.stork.Stork.getInstance() static method. This is not very flexible, esp. in the context of integration in a more complex environment. I think that it might be practical to make this more extensible so that an integrator can provide its own way of obtaining the "correct" (and possibly customized) Stork instance.

Furthermore, it might be useful (and not only for testing) to provide a simple builder for to construct a Stork instance, e.g.

Stork stork = Stork.builder()
   .initialize() // service loader
   .addServiceDiscoveryProvider(customProvider) // custom ServiceDiscoveryProvider
   .build();
@mkouba mkouba added the enhancement Enhancements or Request for enhancement label Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancements or Request for enhancement
Projects
None yet
Development

No branches or pull requests

1 participant