X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e5fd39ad76ac8bcb5e7bfe0c6938fdeb7c8ab4e3..267898c1b23b78d433ef01ddd2da8a444616e088:/services/keepstore/keepstore.go diff --git a/services/keepstore/keepstore.go b/services/keepstore/keepstore.go index 4eaaea8ea3..5414795971 100644 --- a/services/keepstore/keepstore.go +++ b/services/keepstore/keepstore.go @@ -3,7 +3,6 @@ package main import ( "flag" "fmt" - "log" "net" "net/http" "os" @@ -15,6 +14,7 @@ import ( "git.curoverse.com/arvados.git/sdk/go/config" "git.curoverse.com/arvados.git/sdk/go/httpserver" "git.curoverse.com/arvados.git/sdk/go/keepclient" + log "github.com/Sirupsen/logrus" "github.com/coreos/go-systemd/daemon" "github.com/ghodss/yaml" ) @@ -150,10 +150,10 @@ func main() { KeepVM = MakeRRVolumeManager(theConfig.Volumes) // Middleware stack: logger, MaxRequests limiter, method handlers - http.Handle("/", &LoggingRESTRouter{ - httpserver.NewRequestLimiter(theConfig.MaxRequests, - MakeRESTRouter()), - }) + router := MakeRESTRouter() + limiter := httpserver.NewRequestLimiter(theConfig.MaxRequests, router) + router.limiter = limiter + http.Handle("/", &LoggingRESTRouter{router: limiter}) // Set up a TCP listener. listener, err := net.Listen("tcp", theConfig.Listen)