Skip to content

Commit

Permalink
update datastore interface
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann authored and Stebalien committed Dec 3, 2019
1 parent ed92a70 commit 20a4649
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions flatfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,16 @@ func (fs *Datastore) Put(key datastore.Key, value []byte) error {
return err
}

func (fs *Datastore) Sync(prefix datastore.Key) error {
fs.shutdownLock.RLock()
defer fs.shutdownLock.RUnlock()
if fs.shutdown {
return ErrClosed
}

return nil
}

func (fs *Datastore) doOp(oper *op) error {
switch oper.typ {
case opPut:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/ipfs/go-ds-flatfs

require (
github.com/ipfs/go-datastore v0.2.0
github.com/ipfs/go-datastore v0.3.0
github.com/ipfs/go-log v0.0.1
github.com/jbenet/goprocess v0.1.3
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/ipfs/go-datastore v0.2.0 h1:5Wjw6YXzZmtqU1MSrlws64+oLmSqea7gEajTcJickh8=
github.com/ipfs/go-datastore v0.2.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw=
github.com/ipfs/go-datastore v0.3.0 h1:9au0tYi/+n7xeUnGHG6davnS8x9hWbOzP/388Vx3CMs=
github.com/ipfs/go-datastore v0.3.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw=
github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=
github.com/ipfs/go-log v0.0.1 h1:9XTUN/rW64BCG1YhPK9Hoy3q8nr4gOmHHBpgFdfw6Lc=
github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM=
Expand Down

0 comments on commit 20a4649

Please sign in to comment.