Pipe minRequestTimeout as an arg to the apiserver

This commit is contained in:
Prashanth Balasubramanian
2015-05-26 18:39:42 -07:00
parent a7ee5559b1
commit 448867073d
7 changed files with 45 additions and 26 deletions

View File

@@ -185,7 +185,7 @@ func ConnectResource(connecter rest.Connecter, scope RequestScope, admit admissi
}
// ListResource returns a function that handles retrieving a list of resources from a rest.Storage object.
func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch bool) restful.RouteFunction {
func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch bool, minRequestTimeout int) restful.RouteFunction {
return func(req *restful.Request, res *restful.Response) {
w := res.ResponseWriter
@@ -252,7 +252,7 @@ func ListResource(r rest.Lister, rw rest.Watcher, scope RequestScope, forceWatch
errorJSON(err, scope.Codec, w)
return
}
serveWatch(watcher, scope, w, req)
serveWatch(watcher, scope, w, req, minRequestTimeout)
return
}