X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b49229f98012d7c08ce02b8d28dbcc165c8a6c53..0b714d15c15340f3f52c331528d5cbb4cc422f07:/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 +}()