1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-11-01 10:48:30 +08:00
Files
kubo/util/testutil/datastore.go
2015-01-18 14:41:42 -08:00

12 lines
395 B
Go

package testutil
import (
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
syncds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync"
ds2 "github.com/jbenet/go-ipfs/util/datastore2"
)
func ThreadSafeCloserMapDatastore() ds2.ThreadSafeDatastoreCloser {
return ds2.CloserWrap(syncds.MutexWrap(datastore.NewMapDatastore()))
}