Add support for installing custom object APIs

This commit is contained in:
Brendan Burns
2015-08-19 22:08:26 -07:00
parent 7bfc8b5f37
commit b196d0f84b
16 changed files with 603 additions and 158 deletions

View File

@@ -248,6 +248,9 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
var ctxFn ContextFunc
ctxFn = func(req *restful.Request) api.Context {
if context == nil {
return api.NewContext()
}
if ctx, ok := context.Get(req.Request); ok {
return ctx
}