| Index: filter/featureBreaker/rds.go
|
| diff --git a/filter/featureBreaker/rds.go b/filter/featureBreaker/rds.go
|
| index d95643910827a6cdc9398534c57872c4e321c033..3ff80bccf0465a52b697e9eb322fb98cc2292388 100644
|
| --- a/filter/featureBreaker/rds.go
|
| +++ b/filter/featureBreaker/rds.go
|
| @@ -7,54 +7,54 @@ 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 {
|
| *state
|
|
|
| - rds.Interface
|
| + ds.RawInterface
|
| }
|
|
|
| -func (r *rdsState) DecodeKey(encoded string) (ret rds.Key, err error) {
|
| +func (r *rdsState) DecodeKey(encoded string) (ret ds.Key, err error) {
|
| err = r.run(func() (err error) {
|
| - ret, err = r.Interface.DecodeKey(encoded)
|
| + ret, err = r.RawInterface.DecodeKey(encoded)
|
| return
|
| })
|
| return
|
| }
|
|
|
| -func (r *rdsState) RunInTransaction(f func(c context.Context) error, opts *rds.TransactionOptions) error {
|
| +func (r *rdsState) RunInTransaction(f func(c context.Context) error, opts *ds.TransactionOptions) error {
|
| return r.run(func() error {
|
| - return r.Interface.RunInTransaction(f, opts)
|
| + return r.RawInterface.RunInTransaction(f, opts)
|
| })
|
| }
|
|
|
| // 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 *rdsState) DeleteMulti(keys []ds.Key, cb ds.DeleteMultiCB) error {
|
| return r.run(func() error {
|
| - return r.Interface.DeleteMulti(keys, cb)
|
| + return r.RawInterface.DeleteMulti(keys, cb)
|
| })
|
| }
|
|
|
| -func (r *rdsState) GetMulti(keys []rds.Key, cb rds.GetMultiCB) error {
|
| +func (r *rdsState) GetMulti(keys []ds.Key, cb ds.GetMultiCB) error {
|
| return r.run(func() error {
|
| - return r.Interface.GetMulti(keys, cb)
|
| + return r.RawInterface.GetMulti(keys, cb)
|
| })
|
| }
|
|
|
| -func (r *rdsState) PutMulti(keys []rds.Key, vals []rds.PropertyLoadSaver, cb rds.PutMultiCB) error {
|
| +func (r *rdsState) PutMulti(keys []ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
|
| return r.run(func() (err error) {
|
| - return r.Interface.PutMulti(keys, vals, cb)
|
| + return r.RawInterface.PutMulti(keys, vals, cb)
|
| })
|
| }
|
|
|
| // FilterRDS installs a counter RawDatastore 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 ds.AddFilters(c, func(ic context.Context, RawDatastore ds.RawInterface) ds.RawInterface {
|
| return &rdsState{state, RawDatastore}
|
| }), state
|
| }
|
|
|