distribution/registry
Cory Snider f2cbfe2402 health: improve periodic polling of checks
The API for periodic health checks is repetitive, with a distinct
function for polling a checker to each kind of updater. It also gives
the user no control over the lifetime of the polling goroutines nor
which context is passed into the checker.

Replace the existing PeriodicXYZChecker functions with a single Poll
function which composes an Updater with a Checker. Its context parameter
is passed into the checker and also controls when the polling loop
terminates. To guard against health checks failing closed (ostensibly
healthy) when the polling loop is terminated, the updater is forcefully
updated to an error status, overriding any configured threshold.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-11-27 15:38:35 -05:00
..
api fix: if reference exceeds the threshold return 400 and detail 2023-11-22 16:06:33 +00:00
auth feat(linter): enable errcheck linter in golangci-lint 2023-11-18 07:19:24 +00:00
handlers health: improve periodic polling of checks 2023-11-27 15:38:35 -05:00
listener feat(linter): enable errcheck linter in golangci-lint 2023-11-18 07:19:24 +00:00
middleware Merge pull request #2752 from davidswu/registry-driver-middleware 2023-06-21 10:06:13 -07:00
proxy feat(linter): enable errcheck linter in golangci-lint (#4158) 2023-11-21 11:57:34 +00:00
storage fix: if reference exceeds the threshold return 400 and detail 2023-11-22 16:06:33 +00:00
doc.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
registry.go feat(linter): enable errcheck linter in golangci-lint 2023-11-18 07:19:24 +00:00
registry_test.go feat(linter): enable errcheck linter in golangci-lint 2023-11-18 07:19:24 +00:00
root.go feat(linter): enable errcheck linter in golangci-lint 2023-11-18 07:19:24 +00:00