return destroy func to clean up internal resources of storage

This commit is contained in:
Hongchao Deng
2016-08-24 16:35:21 -07:00
parent fff95275df
commit 9fc0e1e98d
48 changed files with 194 additions and 113 deletions

View File

@@ -53,7 +53,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST, *FinalizeREST) {
prefix := "/" + opts.ResourcePrefix
newListFunc := func() runtime.Object { return &api.NamespaceList{} }
storageInterface := opts.Decorator(
storageInterface, _ := opts.Decorator(
opts.StorageConfig,
cachesize.GetWatchCacheSizeByResource(cachesize.Namespaces),
&api.Namespace{},