Skip to content

Commit 333fe37

Browse files
committed
update datastore interface
1 parent 6304caf commit 333fe37

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

flatfs.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,16 @@ func (fs *Datastore) Put(key datastore.Key, value []byte) error {
388388
return err
389389
}
390390

391+
func (fs *Datastore) Sync(prefix datastore.Key) error {
392+
fs.shutdownLock.RLock()
393+
defer fs.shutdownLock.RUnlock()
394+
if fs.shutdown {
395+
return ErrClosed
396+
}
397+
398+
return nil
399+
}
400+
391401
func (fs *Datastore) doOp(oper *op) error {
392402
switch oper.typ {
393403
case opPut:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module github.com/ipfs/go-ds-flatfs
22

33
require (
4-
github.com/ipfs/go-datastore v0.1.1
4+
github.com/ipfs/go-datastore v0.2.1-0.20191203002116-8ddf6ada75cf
55
github.com/ipfs/go-log v0.0.1
66
github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8
77
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ github.com/ipfs/go-datastore v0.1.0 h1:TOxI04l8CmO4zGtesENhzm4PwkFwJXY3rKiYaaMf9
1010
github.com/ipfs/go-datastore v0.1.0/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE=
1111
github.com/ipfs/go-datastore v0.1.1 h1:F4k0TkTAZGLFzBOrVKDAvch6JZtuN4NHkfdcEZL50aI=
1212
github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw=
13+
github.com/ipfs/go-datastore v0.1.2-0.20191127175949-52c36621e1d3/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw=
14+
github.com/ipfs/go-datastore v0.2.1-0.20191203002116-8ddf6ada75cf/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw=
1315
github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=
1416
github.com/ipfs/go-log v0.0.1 h1:9XTUN/rW64BCG1YhPK9Hoy3q8nr4gOmHHBpgFdfw6Lc=
1517
github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM=

0 commit comments

Comments
 (0)