devsisters / shardcake

Sharding and location transparency for Scala
https://devsisters.github.io/shardcake/
Apache License 2.0
382 stars 29 forks source link

[DX] make registerSingleton accept and automatically provide environment #88

Closed mattiamanzati closed 11 months ago

mattiamanzati commented 11 months ago

It would be nice if registerSingleton behaves the same way of registerEntity, by accepting a ZIO with an env, and spread the env requirement to the result ZIO.

see: https://github.com/mattiamanzati/shardcake/commit/8f9bbe9c593c32acf49e3eb77f79203a92ca23f8#diff-504aba56bd6bfc9961e6f146a43bea0b654ea96c0549b509879d73d076e18c59