Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
d12b9bd1
Commit
d12b9bd1
authored
Jul 24, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
dc78282e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
go/transaction/api.go
go/transaction/api.go
+1
-0
go/transaction/transaction.go
go/transaction/transaction.go
+5
-2
No files found.
go/transaction/api.go
View file @
d12b9bd1
...
...
@@ -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
)
}
...
...
go/transaction/transaction.go
View file @
d12b9bd1
...
...
@@ -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"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment