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

don't depend on BootstrapRuntime, use an akka-extension instead #32

Open
domdorn opened this issue Feb 10, 2021 · 0 comments
Open

don't depend on BootstrapRuntime, use an akka-extension instead #32

domdorn opened this issue Feb 10, 2021 · 0 comments

Comments

@domdorn
Copy link

domdorn commented Feb 10, 2021

The current traits depend on BootstrapRuntime. This makes testing hard.

I suggest an alternative approach:

  1. Create a Akka-Extension, e.g. ZIOAkkaHttp that stores the Runtime. This one can be registered on application startup, as soon as an ActorSystem is available.
  2. Adjust the effects to work as a directive. There is already the extractActorSystem directive, so we'd be able to do something like:
extractActorSystem( ac => ZIOAkkaHttp(ac).getRuntime.unsafeRunToFuture(f))

What do you think?

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