mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 03:17:43 +08:00
25 lines
463 B
Go
25 lines
463 B
Go
package util
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore"
|
|
)
|
|
|
|
type ThreadSafeDatastoreCloser interface {
|
|
datastore.ThreadSafeDatastore
|
|
io.Closer
|
|
}
|
|
|
|
func CloserWrap(ds datastore.ThreadSafeDatastore) ThreadSafeDatastoreCloser {
|
|
return &datastoreCloserWrapper{ds}
|
|
}
|
|
|
|
type datastoreCloserWrapper struct {
|
|
datastore.ThreadSafeDatastore
|
|
}
|
|
|
|
func (w *datastoreCloserWrapper) Close() error {
|
|
return nil // no-op
|
|
}
|