Closed juliaogris closed 4 years ago
Add DefaultServer to health.pkg similarly to the DefaultServeMux in the http package: for the simple case, the health package can now be used without explicitly instantiating a health.Server:
appServer := http.NewServeMux() // attach handlers to appServer health.RegisterWith(appServer) // expensive initialisation health.SetReady(tue)
Top-level functions RegisterWith, RegisterWithGRPC and SetReady operate on the DefaultServer for convenience.
Update example and tests. Increase coverage by a little. Remove goconst linter - it is fine to repeat "not a URL" in tests more than twice.
"not a URL"
Add DefaultServer to health.pkg similarly to the DefaultServeMux in the http package: for the simple case, the health package can now be used without explicitly instantiating a health.Server:
Top-level functions RegisterWith, RegisterWithGRPC and SetReady operate on the DefaultServer for convenience.
Update example and tests. Increase coverage by a little. Remove goconst linter - it is fine to repeat
"not a URL"
in tests more than twice.