Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
489dab67
Commit
489dab67
authored
Dec 31, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a1ed5085
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
go/neo/storage.go
go/neo/storage.go
+5
-0
go/neo/storage/fs1/fs1.go
go/neo/storage/fs1/fs1.go
+3
-0
go/neo/storage/storage.go
go/neo/storage/storage.go
+2
-0
No files found.
go/neo/storage.go
View file @
489dab67
...
@@ -156,6 +156,11 @@ func (stor *Storage) Run(ctx context.Context, l xnet.Listener) (err error) {
...
@@ -156,6 +156,11 @@ func (stor *Storage) Run(ctx context.Context, l xnet.Listener) (err error) {
serveCancel
()
serveCancel
()
wg
.
Wait
()
wg
.
Wait
()
err2
:=
stor
.
back
.
Close
()
if
err
==
nil
{
err
=
err2
}
return
err
// XXX err ctx
return
err
// XXX err ctx
}
}
...
...
go/neo/storage/fs1/fs1.go
View file @
489dab67
...
@@ -56,6 +56,9 @@ func Open(ctx context.Context, path string) (*Backend, error) {
...
@@ -56,6 +56,9 @@ func Open(ctx context.Context, path string) (*Backend, error) {
return
&
Backend
{
zstor
:
zstor
},
nil
return
&
Backend
{
zstor
:
zstor
},
nil
}
}
func
(
f
*
Backend
)
Close
()
error
{
return
f
.
zstor
.
Close
()
}
func
(
f
*
Backend
)
LastTid
(
ctx
context
.
Context
)
(
zodb
.
Tid
,
error
)
{
func
(
f
*
Backend
)
LastTid
(
ctx
context
.
Context
)
(
zodb
.
Tid
,
error
)
{
return
f
.
zstor
.
Sync
(
ctx
)
return
f
.
zstor
.
Sync
(
ctx
)
...
...
go/neo/storage/storage.go
View file @
489dab67
...
@@ -47,6 +47,8 @@ type Backend interface {
...
@@ -47,6 +47,8 @@ type Backend interface {
// Load, similarly to zodb.IStorageDriver.Load should load object data addressed by xid.
// Load, similarly to zodb.IStorageDriver.Load should load object data addressed by xid.
Load
(
ctx
context
.
Context
,
xid
zodb
.
Xid
)
(
*
proto
.
AnswerObject
,
error
)
Load
(
ctx
context
.
Context
,
xid
zodb
.
Xid
)
(
*
proto
.
AnswerObject
,
error
)
Close
()
error
}
}
// BackendOpener is a function to open a NEO storage backend
// BackendOpener is a function to open a NEO storage backend
...
...
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