Skip to content

Commit

Permalink
Merge pull request #60 from ipfs/feat/ds-update
Browse files Browse the repository at this point in the history
Update Datastore Interface
  • Loading branch information
Stebalien authored Dec 3, 2019
2 parents ed92a70 + 20a4649 commit b336dbc
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 b336dbc

Please sign in to comment.