4823: More tests and fixes for updating and merging from remote api record.
[arvados.git] / services / keepstore / keepstore.go
index d6eb6b22036bf576c47279d6de417eb1d63f037d..75b6c4014dc3e4afdabc3efebc22c7ec8862f517 100644 (file)
@@ -94,6 +94,11 @@ var KeepVM VolumeManager
 // The pull list manager and trash queue are threadsafe queues which
 // support atomic update operations. The PullHandler and TrashHandler
 // store results from Data Manager /pull and /trash requests here.
+//
+// See the Keep and Data Manager design documents for more details:
+// https://arvados.org/projects/arvados/wiki/Keep_Design_Doc
+// https://arvados.org/projects/arvados/wiki/Data_Manager_Design_Doc
+//
 var pullq *WorkQueue
 var trashq *WorkQueue
 
@@ -257,9 +262,11 @@ func main() {
        // Start a round-robin VolumeManager with the volumes we have found.
        KeepVM = MakeRRVolumeManager(goodvols)
 
-       // Tell the built-in HTTP server to direct all requests to the REST
-       // router.
-       http.Handle("/", MakeRESTRouter())
+       // Tell the built-in HTTP server to direct all requests to the REST router.
+       loggingRouter := MakeLoggingRESTRouter()
+       http.HandleFunc("/", func(resp http.ResponseWriter, req *http.Request) {
+               loggingRouter.ServeHTTP(resp, req)
+       })
 
        // Set up a TCP listener.
        listener, err := net.Listen("tcp", listen)