X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d77b362ffa44f0fd48cb7127ca34d6d676fad8ca..f49e418e217e3dcfcfc01b267fe45e2fed09030c:/services/keepstore/handlers.go diff --git a/services/keepstore/handlers.go b/services/keepstore/handlers.go index bd88acb5a9..0a540f58e6 100644 --- a/services/keepstore/handlers.go +++ b/services/keepstore/handlers.go @@ -1,3 +1,7 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + package main // REST handlers for Keep are implemented here. @@ -25,6 +29,7 @@ import ( "github.com/gorilla/mux" + "git.curoverse.com/arvados.git/sdk/go/health" "git.curoverse.com/arvados.git/sdk/go/httpserver" log "github.com/Sirupsen/logrus" ) @@ -74,6 +79,11 @@ func MakeRESTRouter() *router { // Untrash moves blocks from trash back into store rest.HandleFunc(`/untrash/{hash:[0-9a-f]{32}}`, UntrashHandler).Methods("PUT") + rest.Handle("/_health/{check}", &health.Handler{ + Token: theConfig.ManagementToken, + Prefix: "/_health/", + }).Methods("GET") + // Any request which does not match any of these routes gets // 400 Bad Request. rest.NotFoundHandler = http.HandlerFunc(BadRequestHandler)