mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-26 12:57:44 +08:00
12 lines
377 B
Go
12 lines
377 B
Go
package testutil
|
|
|
|
import (
|
|
ds2 "github.com/ipfs/go-ipfs/thirdparty/datastore2"
|
|
"gx/ipfs/QmbzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU/go-datastore"
|
|
syncds "gx/ipfs/QmbzuUusHqaLLoNTDEVLcSF6vZDHZDLPC7p4bztRvvkXxU/go-datastore/sync"
|
|
)
|
|
|
|
func ThreadSafeCloserMapDatastore() ds2.ThreadSafeDatastoreCloser {
|
|
return ds2.CloserWrap(syncds.MutexWrap(datastore.NewMapDatastore()))
|
|
}
|