X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b6d7efab2c4bffa3fabd55b166e44cca8ac1391f..c68e4ba51336a871dff26ae9f8dc7eb7e316083d:/lib/service/error.go diff --git a/lib/service/error.go b/lib/service/error.go index c4049f7064..a4d7370d1b 100644 --- a/lib/service/error.go +++ b/lib/service/error.go @@ -36,3 +36,15 @@ func (eh errorHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { func (eh errorHandler) CheckHealth() error { return eh.err } + +// Done returns a closed channel to indicate the service has +// stopped/failed. +func (eh errorHandler) Done() <-chan struct{} { + return doneChannel +} + +var doneChannel = func() <-chan struct{} { + done := make(chan struct{}) + close(done) + return done +}()