InVisionApp / go-health

Library for enabling asynchronous health checks in your service
MIT License
750 stars 58 forks source link

Ideally checkers with external dependencies should live in a different package #56

Closed maxcnunes closed 5 years ago

maxcnunes commented 6 years ago

For instance, I just need to use the reachable checker and my project doesn't have any mongo dep. But, to use the reachable checker I need to install all dependencies in InVisionApp/go-health/checker and the mongo one has a dependency on github.com/globalsign/mgo. If the checkers that have some external dependency were in a different package it wouldn't force me to have a dependency on something that I'm not using. No need to move them to a different repository, just having them a subfolder would be enough to avoid this dependency issue. I can create a PR for it, but it would cause a breaking change in the project.

Suggested packages:

dselans commented 6 years ago

@maxcnunes This was definitely discussed when we initially started the project - the idea was that it'd be annoying to specify & import every single checker (if your application used multiple deps). Now that there's a bunch of checkers, this seems like a misstep.

I'm cool with it - open a PR and we can cut a new (breaking) release.

dselans commented 5 years ago

All done - 2.0.0 release cut. Thanks @maxcnunes !