@@ -13,22 +13,8 @@ import (
1313
1414// NewDefaultKVStore creates instance of default key-value store.
1515func NewDefaultKVStore (rootDir , dbPath , dbName string ) (ds.Batching , error ) {
16- return newDefaultKVStore (rootDir , dbPath , dbName , nil )
17- }
18-
19- // NewDefaultReadOnlyKVStore creates a key-value store opened in badger's read-only mode.
20- //
21- // This is useful for tools that only inspect state (such as store-info) where the
22- // underlying data directory might be mounted read-only.
23- func NewDefaultReadOnlyKVStore (rootDir , dbPath , dbName string ) (ds.Batching , error ) {
24- opts := badger4 .DefaultOptions
25- opts .Options = opts .Options .WithReadOnly (true )
26- return newDefaultKVStore (rootDir , dbPath , dbName , & opts )
27- }
28-
29- func newDefaultKVStore (rootDir , dbPath , dbName string , options * badger4.Options ) (ds.Batching , error ) {
3016 path := filepath .Join (rootify (rootDir , dbPath ), dbName )
31- return badger4 .NewDatastore (path , options )
17+ return badger4 .NewDatastore (path , nil )
3218}
3319
3420// PrefixEntries retrieves all entries in the datastore whose keys have the supplied prefix
0 commit comments