move new etcd storage into cacher

This commit is contained in:
Hongchao Deng
2016-08-08 15:12:54 -07:00
parent 2b34988712
commit d0938094d9
88 changed files with 188 additions and 173 deletions

View File

@@ -63,7 +63,7 @@ func NewREST(opts generic.RESTOptions) (*REST, *StatusREST) {
newListFunc := func() runtime.Object { return &api.ReplicationControllerList{} }
storageInterface := opts.Decorator(
opts.Storage,
opts.StorageConfig,
cachesize.GetWatchCacheSizeByResource(cachesize.Controllers),
&api.ReplicationController{},
prefix,

View File

@@ -39,7 +39,7 @@ const (
func newStorage(t *testing.T) (ControllerStorage, *etcdtesting.EtcdTestServer) {
etcdStorage, server := registrytest.NewEtcdStorage(t, "")
restOptions := generic.RESTOptions{Storage: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1}
restOptions := generic.RESTOptions{StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1}
storage := NewStorage(restOptions)
return storage, server
}