[ARVADOS] updated: 645a998c13b7dcd21af72187d953b8069288d6d2
git at public.curoverse.com
git at public.curoverse.com
Mon Nov 17 17:02:28 EST 2014
Summary of changes:
services/keepstore/handler_test.go | 4 ++--
services/keepstore/keepstore.go | 4 ++--
services/keepstore/router_wrapper.go | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
via 645a998c13b7dcd21af72187d953b8069288d6d2 (commit)
from 28c6bbeeed6b228d51666914bcd845d05500107e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 645a998c13b7dcd21af72187d953b8069288d6d2
Author: radhika <radhika at curoverse.com>
Date: Mon Nov 17 17:02:00 2014 -0500
4194: rename RESTRouterWrapper as LoggingRESTRouter
diff --git a/services/keepstore/handler_test.go b/services/keepstore/handler_test.go
index fbf4ef3..d1be04a 100644
--- a/services/keepstore/handler_test.go
+++ b/services/keepstore/handler_test.go
@@ -731,8 +731,8 @@ func IssueRequest(rt *RequestTester) *httptest.ResponseRecorder {
if rt.api_token != "" {
req.Header.Set("Authorization", "OAuth2 "+rt.api_token)
}
- routerWrapper := MakeRESTRouterWrapper()
- routerWrapper.ServeHTTP(response, req)
+ loggingRouter := MakeLoggingRESTRouter()
+ loggingRouter.ServeHTTP(response, req)
return response
}
diff --git a/services/keepstore/keepstore.go b/services/keepstore/keepstore.go
index 5ec1ad0..3c6d634 100644
--- a/services/keepstore/keepstore.go
+++ b/services/keepstore/keepstore.go
@@ -263,9 +263,9 @@ func main() {
KeepVM = MakeRRVolumeManager(goodvols)
// Tell the built-in HTTP server to direct all requests to the REST router.
- routerWrapper := MakeRESTRouterWrapper()
+ loggingRouter := MakeLoggingRESTRouter()
http.HandleFunc("/", func(resp http.ResponseWriter, req *http.Request) {
- routerWrapper.ServeHTTP(resp, req)
+ loggingRouter.ServeHTTP(resp, req)
})
// Set up a TCP listener.
diff --git a/services/keepstore/router_wrapper.go b/services/keepstore/router_wrapper.go
index b1ebd41..edc169f 100644
--- a/services/keepstore/router_wrapper.go
+++ b/services/keepstore/router_wrapper.go
@@ -26,16 +26,16 @@ func (loggingWriter *LoggingResponseWriter) Write(data []byte) (int, error){
return loggingWriter.ResponseWriter.Write(data)
}
-type RESTRouterWrapper struct {
+type LoggingRESTRouter struct {
router *mux.Router
}
-func MakeRESTRouterWrapper() (RESTRouterWrapper) {
+func MakeLoggingRESTRouter() (LoggingRESTRouter) {
router := MakeRESTRouter()
- return (RESTRouterWrapper{router})
+ return (LoggingRESTRouter{router})
}
-func (wrapper RESTRouterWrapper) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
+func (wrapper LoggingRESTRouter) ServeHTTP(resp http.ResponseWriter, req *http.Request) {
loggingWriter := LoggingResponseWriter{200, bytes.NewBuffer(make([]byte, 0, 0)), resp}
wrapper.router.ServeHTTP(&loggingWriter, req)
if loggingWriter.Status == 200 {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list