X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2f66d4cc05e9442a9bb69969744d0750a02a1ed4..a9be3117466506dffc39617be1c58406c5914e4b:/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 +}()