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

Unified Diff: filter/featureBreaker/rds.go

Issue 1270063002: Rename rawdatastore -> datastore (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: and a bit more Created 5 years, 4 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 | « filter/featureBreaker/featurebreaker_test.go ('k') | impl/dummy/dummy.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filter/featureBreaker/rds.go
diff --git a/filter/featureBreaker/rds.go b/filter/featureBreaker/rds.go
index d95643910827a6cdc9398534c57872c4e321c033..e1ef7f20fcfb6a9b52a70b3705452d1ca3264c62 100644
--- a/filter/featureBreaker/rds.go
+++ b/filter/featureBreaker/rds.go
@@ -7,16 +7,16 @@ package featureBreaker
import (
"golang.org/x/net/context"
- rds "github.com/luci/gae/service/rawdatastore"
+ ds "github.com/luci/gae/service/datastore"
)
-type rdsState struct {
+type dsState struct {
*state
- rds.Interface
+ ds.Interface
}
-func (r *rdsState) DecodeKey(encoded string) (ret rds.Key, err error) {
+func (r *dsState) DecodeKey(encoded string) (ret ds.Key, err error) {
err = r.run(func() (err error) {
ret, err = r.Interface.DecodeKey(encoded)
return
@@ -24,7 +24,7 @@ func (r *rdsState) DecodeKey(encoded string) (ret rds.Key, err error) {
return
}
-func (r *rdsState) RunInTransaction(f func(c context.Context) error, opts *rds.TransactionOptions) error {
+func (r *dsState) RunInTransaction(f func(c context.Context) error, opts *ds.TransactionOptions) error {
return r.run(func() error {
return r.Interface.RunInTransaction(f, opts)
})
@@ -33,28 +33,28 @@ func (r *rdsState) RunInTransaction(f func(c context.Context) error, opts *rds.T
// TODO(riannucci): Allow the user to specify a multierror which will propagate
// to the callback correctly.
-func (r *rdsState) DeleteMulti(keys []rds.Key, cb rds.DeleteMultiCB) error {
+func (r *dsState) DeleteMulti(keys []ds.Key, cb ds.DeleteMultiCB) error {
return r.run(func() error {
return r.Interface.DeleteMulti(keys, cb)
})
}
-func (r *rdsState) GetMulti(keys []rds.Key, cb rds.GetMultiCB) error {
+func (r *dsState) GetMulti(keys []ds.Key, cb ds.GetMultiCB) error {
return r.run(func() error {
return r.Interface.GetMulti(keys, cb)
})
}
-func (r *rdsState) PutMulti(keys []rds.Key, vals []rds.PropertyLoadSaver, cb rds.PutMultiCB) error {
+func (r *dsState) PutMulti(keys []ds.Key, vals []ds.PropertyLoadSaver, cb ds.PutMultiCB) error {
return r.run(func() (err error) {
return r.Interface.PutMulti(keys, vals, cb)
})
}
-// FilterRDS installs a counter RawDatastore filter in the context.
+// FilterRDS installs a counter datastore filter in the context.
func FilterRDS(c context.Context, defaultError error) (context.Context, FeatureBreaker) {
state := newState(defaultError)
- return rds.AddFilters(c, func(ic context.Context, RawDatastore rds.Interface) rds.Interface {
- return &rdsState{state, RawDatastore}
+ return ds.AddFilters(c, func(ic context.Context, datastore ds.Interface) ds.Interface {
+ return &dsState{state, datastore}
}), state
}
« no previous file with comments | « filter/featureBreaker/featurebreaker_test.go ('k') | impl/dummy/dummy.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698