Closed robacarp closed 2 years ago
Just ran in to an issue which could affect how this is thought of. Being able to swap out the redis config for something else is nice, but if Mosquito keeps the default built-in, you'd have to have some sort of redis shard as a dependency. This seems to cause conflics with other shards that may include a different redis shard (https://github.com/cable-cr/cable/issues/46#issuecomment-1187963323)
If you went with a swappable config, you'd probably have to create a separate shard for "out of the box" functionality like:
mosquito:
github: mosquito-cr/mosquito
mosquito_backend:
github: mosquito-cr/redis_backend
And the users would have to require that separately in order to be able to swap that out. If you kept the stefanwille
redis shard in, then anyone using Mosquito would be required to use that shard interface anyway
This is a proof-of-concept for how the redis connection dependency could be injected rather than constructed.
Benefits:
Drawbacks: