func NewEtcdStorage(client tools.EtcdClient, codec runtime.Codec, prefix string) storage.Interface { return &etcdHelper{ client: client, codec: codec, versioner: APIObjectVersioner{}, copier: api.Scheme, pathPrefix: path.Join("/", prefix), cache: util.NewCache(maxEtcdCacheEntries), } }
// Creates a new storage interface from the client // TODO: deprecate in favor of storage.Config abstraction over time func NewEtcdStorage(client etcd.Client, codec runtime.Codec, prefix string, quorum bool) storage.Interface { return &etcdHelper{ etcdMembersAPI: etcd.NewMembersAPI(client), etcdKeysAPI: etcd.NewKeysAPI(client), codec: codec, versioner: APIObjectVersioner{}, copier: api.Scheme, pathPrefix: path.Join("/", prefix), quorum: quorum, cache: util.NewCache(maxEtcdCacheEntries), } }