Commit d12b9bd1 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent dc78282e
......@@ -177,6 +177,7 @@ type Transaction interface {
// New creates new transaction.
//
// XXX the transaction will be associated with ctx (txnCtx derives from ctx + associates txn)
// XXX nested transactions are not supported.
func New(ctx context.Context) (txn Transaction, txnCtx context.Context) {
return newTxn(ctx)
}
......
......@@ -64,26 +64,29 @@ func newTxn(ctx context.Context) (Transaction, context.Context) {
return txn, txnCtx
}
// Status implements Transaction.
func (txn *transaction) Status() Status {
txn.mu.Lock()
defer txn.mu.Unlock()
return txn.status
}
// Commit implements Transaction.
func (txn *transaction) Commit(ctx context.Context) error {
panic("TODO")
}
// Abort implements Transaction.
func (txn *transaction) Abort() {
panic("TODO")
}
// Join implements Transaction.
func (txn *transaction) Join(dm DataManager) {
panic("TODO")
}
// RegisterSync implements Transaction.
func (txn *transaction) RegisterSync(sync Synchronizer) {
panic("TODO")
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment