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

@@ -70,7 +70,7 @@ func NewStorage(opts generic.RESTOptions, connection client.ConnectionInfoGetter
newListFunc := func() runtime.Object { return &api.NodeList{} }
storageInterface := opts.Decorator(
opts.Storage,
opts.StorageConfig,
cachesize.GetWatchCacheSizeByResource(cachesize.Nodes),
&api.Node{},
prefix,

View File

@@ -39,7 +39,7 @@ func (fakeConnectionInfoGetter) GetConnectionInfo(ctx api.Context, nodeName stri
func newStorage(t *testing.T) (*REST, *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, fakeConnectionInfoGetter{}, nil)
return storage.Node, server
}