zio/zio-zmx

Remove Environmental Requirements From Service Methods

Closed this issue · 1 comments

Many of the operators defined on the services in the zio.zmx package have environmental requirements (e.g. listen has a Clock dependency). When working with services it is generally an anti-pattern to have methods that require an environment type since the environmental dependency should be expressed in the service itself. For example, for the listen method we can access the Clock instance that the metrics service already requires and provide that to make sure none of the operators still require a Clock.

This ticket is to go through all the methods on the services in the zio.zmx package and make sure they do not require an environmental type, refactoring them if necessary as described above.

I would like to have a closer look on this one.