Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Unified Diff: go/src/infra/gae/libs/gae/memory/raw_datstore.go

Issue 1226063003: Move dummy service implementations into their own package. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@abstract
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « go/src/infra/gae/libs/gae/memory/memcache.go ('k') | go/src/infra/gae/libs/gae/memory/taskqueue.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: go/src/infra/gae/libs/gae/memory/raw_datstore.go
diff --git a/go/src/infra/gae/libs/gae/memory/raw_datstore.go b/go/src/infra/gae/libs/gae/memory/raw_datstore.go
index a9a10183005125d7a304e933677b7bfa2bce6c5a..3df8f2d3e9865a9ac39efa659e12f4badb4da96c 100644
--- a/go/src/infra/gae/libs/gae/memory/raw_datstore.go
+++ b/go/src/infra/gae/libs/gae/memory/raw_datstore.go
@@ -10,22 +10,23 @@ import (
"golang.org/x/net/context"
"infra/gae/libs/gae"
+ "infra/gae/libs/gae/dummy"
"infra/gae/libs/gae/helper"
)
//////////////////////////////////// public ////////////////////////////////////
-// useDS adds a gae.Datastore implementation to context, accessible
+// useRDS adds a gae.Datastore implementation to context, accessible
// by gae.GetDS(c)
-func useDS(c context.Context) context.Context {
+func useRDS(c context.Context) context.Context {
return gae.SetRDSFactory(c, func(ic context.Context) gae.RawDatastore {
dsd := cur(ic).Get(memContextDSIdx)
switch x := dsd.(type) {
case *dataStoreData:
- return &dsImpl{gae.DummyRDS(), x, curGID(ic).namespace, ic}
+ return &dsImpl{dummy.RDS(), x, curGID(ic).namespace, ic}
case *txnDataStoreData:
- return &txnDsImpl{gae.DummyRDS(), x, curGID(ic).namespace}
+ return &txnDsImpl{dummy.RDS(), x, curGID(ic).namespace}
default:
panic(fmt.Errorf("DS: bad type: %v in context %v", dsd, ic))
}
@@ -94,7 +95,7 @@ var (
)
func (d *dsImpl) NewQuery(kind string) gae.DSQuery {
- return &queryImpl{DSQuery: gae.DummyQY(), ns: d.ns, kind: kind}
+ return &queryImpl{DSQuery: dummy.QY(), ns: d.ns, kind: kind}
}
func (d *dsImpl) Run(q gae.DSQuery) gae.DSIterator {
« no previous file with comments | « go/src/infra/gae/libs/gae/memory/memcache.go ('k') | go/src/infra/gae/libs/gae/memory/taskqueue.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698