| Index: impl/memory/context.go
|
| diff --git a/memory/context.go b/impl/memory/context.go
|
| similarity index 93%
|
| rename from memory/context.go
|
| rename to impl/memory/context.go
|
| index f0194d038d6391810bcf9902e5734889dcf9e3d5..ec588e712981c7f08709443eb334348e13f064e0 100644
|
| --- a/memory/context.go
|
| +++ b/impl/memory/context.go
|
| @@ -8,7 +8,7 @@ import (
|
| "errors"
|
| "sync"
|
|
|
| - "github.com/luci/gae"
|
| + rds "github.com/luci/gae/service/rawdatastore"
|
| "golang.org/x/net/context"
|
| )
|
|
|
| @@ -18,7 +18,7 @@ type memContextObj interface {
|
| applyTxn(c context.Context, m memContextObj)
|
|
|
| endTxn()
|
| - mkTxn(*gae.DSTransactionOptions) memContextObj
|
| + mkTxn(*rds.TransactionOptions) memContextObj
|
| }
|
|
|
| type memContext []memContextObj
|
| @@ -61,7 +61,7 @@ func (m memContext) endTxn() {
|
| }
|
| }
|
|
|
| -func (m memContext) mkTxn(o *gae.DSTransactionOptions) memContextObj {
|
| +func (m memContext) mkTxn(o *rds.TransactionOptions) memContextObj {
|
| ret := make(memContext, len(m))
|
| for i, itm := range m {
|
| ret[i] = itm.mkTxn(o)
|
| @@ -132,7 +132,7 @@ var memContextKey memContextKeyType
|
| // fake TaskQueue is NOT backed by the fake Datastore. This is done to make the
|
| // test-access API for TaskQueue better (instead of trying to reconstitute the
|
| // state of the task queue from a bunch of datastore accesses).
|
| -func (d *dsImpl) RunInTransaction(f func(context.Context) error, o *gae.DSTransactionOptions) error {
|
| +func (d *dsImpl) RunInTransaction(f func(context.Context) error, o *rds.TransactionOptions) error {
|
| curMC := cur(d.c)
|
|
|
| txnMC := curMC.mkTxn(o)
|
| @@ -154,7 +154,7 @@ func (d *dsImpl) RunInTransaction(f func(context.Context) error, o *gae.DSTransa
|
| if curMC.canApplyTxn(txnMC) {
|
| curMC.applyTxn(d.c, txnMC)
|
| } else {
|
| - return gae.ErrDSConcurrentTransaction
|
| + return rds.ErrConcurrentTransaction
|
| }
|
| return nil
|
| }
|
|
|