Skip to content

Commit 429bf4c

Browse files
Merge pull request #11 from buildbuddy-io/openraw
Add OpenRaw method to open a kv store from a pebble db
2 parents 8b64484 + ff8eb55 commit 429bf4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

kythe/go/storage/pebble/pebble.go

+5
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ func Open(path string, opts *Options) (keyvalue.DB, error) {
108108
}, nil
109109
}
110110

111+
// OpenRaw returns a keyvalue DB backed by the provided pebble database.
112+
func OpenRaw(db *pebble.DB) keyvalue.DB {
113+
return &pebbleDB{db: db}
114+
}
115+
111116
// Close will close the underlying pebble database.
112117
func (p *pebbleDB) Close(_ context.Context) error {
113118
return p.db.Close()

0 commit comments

Comments
 (0)