Skip to content

Commit d5009fb

Browse files
committed
update datastore interface
1 parent 08467f0 commit d5009fb

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

datastore.go

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ func (a *accessor) Put(key ds.Key, value []byte) (err error) {
7979
return a.ldb.Put(key.Bytes(), value, nil)
8080
}
8181

82+
func (a *accessor) Sync(prefix ds.Key) error {
83+
return nil
84+
}
85+
8286
func (a *accessor) Get(key ds.Key) (value []byte, err error) {
8387
val, err := a.ldb.Get(key.Bytes(), nil)
8488
if err != nil {

ds_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var testcases = map[string]string{
3030
// d, close := newDS(t)
3131
// defer close()
3232
func newDS(t *testing.T) (*Datastore, func()) {
33-
path, err := ioutil.TempDir("/tmp", "testing_leveldb_")
33+
path, err := ioutil.TempDir("", "testing_leveldb_")
3434
if err != nil {
3535
t.Fatal(err)
3636
}

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module github.com/ipfs/go-ds-leveldb
22

33
require (
4-
github.com/ipfs/go-datastore v0.1.1
4+
github.com/ipfs/go-datastore v0.1.2-0.20191127175949-52c36621e1d3
55
github.com/syndtr/goleveldb v1.0.0
66
)
77

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
1010
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1111
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
1212
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
13-
github.com/ipfs/go-datastore v0.1.1 h1:F4k0TkTAZGLFzBOrVKDAvch6JZtuN4NHkfdcEZL50aI=
14-
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 h1:tJ6mHocB0mIJTNujycIKEv4e1a6gAcE+nMkA18ku7Sc=
14+
github.com/ipfs/go-datastore v0.1.2-0.20191127175949-52c36621e1d3/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw=
1515
github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=
1616
github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8 h1:bspPhN+oKYFk5fcGNuQzp6IGzYQSenLEgH3s6jkXrWw=
1717
github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY=

0 commit comments

Comments
 (0)