Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-datastore
Commits
3f52705c
Unverified
Commit
3f52705c
authored
Jan 28, 2019
by
Steven Allen
Committed by
GitHub
Jan 28, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #111 from ywh254/feat/add-datastore-close
feat(datastore): expose datastore Close()
parents
3a9490ad
1b6dd8f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
autobatch/autobatch.go
autobatch/autobatch.go
+4
-0
datastore.go
datastore.go
+2
-0
failstore/failstore.go
failstore/failstore.go
+5
-0
No files found.
autobatch/autobatch.go
View file @
3f52705c
...
...
@@ -112,3 +112,7 @@ func (d *Datastore) Query(q dsq.Query) (dsq.Results, error) {
func
(
d
*
Datastore
)
DiskUsage
()
(
uint64
,
error
)
{
return
ds
.
DiskUsage
(
d
.
child
)
}
func
(
d
*
Datastore
)
Close
()
error
{
return
d
.
child
.
Close
()
}
datastore.go
View file @
3f52705c
...
...
@@ -2,6 +2,7 @@ package datastore
import
(
"errors"
"io"
"time"
query
"github.com/ipfs/go-datastore/query"
...
...
@@ -33,6 +34,7 @@ should be checked by callers.
type
Datastore
interface
{
Read
Write
io
.
Closer
}
// Write is the write-side of the Datastore interface.
...
...
failstore/failstore.go
View file @
3f52705c
...
...
@@ -94,6 +94,11 @@ func (d *Failstore) DiskUsage() (uint64, error) {
return
ds
.
DiskUsage
(
d
.
child
)
}
// Close implements the Datastore interface
func
(
d
*
Failstore
)
Close
()
error
{
return
d
.
child
.
Close
()
}
// FailBatch implements batching operations on the Failstore.
type
FailBatch
struct
{
cb
ds
.
Batch
...
...
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