-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(store/v2): move kv stores to kv sub-package (#18243)
- Loading branch information
1 parent
ff3ec25
commit 685a0a3
Showing
15 changed files
with
42 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package branchkv | ||
package branch | ||
|
||
import ( | ||
"slices" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Memory KVStore | ||
|
||
The `mem.Store` implementation defines an in-memory `KVStore`, which is internally | ||
backed by a thread-safe BTree. The `mem.Store` does not provide any branching | ||
functionality and should be used as an ephemeral store, typically reset between | ||
blocks. A `mem.Store` contains no reference to a parent store, but can be used | ||
as a parent store for other stores. The `mem.Store` is can be useful for testing | ||
purposes and where state persistence is not required or should be ephemeral. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package memkv | ||
package mem | ||
|
||
import ( | ||
"bytes" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package memkv | ||
package mem | ||
|
||
import ( | ||
"bytes" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# tracekv | ||
# Trace KVStore | ||
|
||
The `tracekv.Store` implementation defines a store which wraps a parent `KVStore` | ||
The `trace.Store` implementation defines a store which wraps a parent `KVStore` | ||
and traces all operations performed on it. Each trace operation is written to a | ||
provided `io.Writer` object. Specifically, a `TraceOperation` object is JSON | ||
encoded and written to the writer. The `TraceOperation` object contains the exact | ||
operation, e.g. a read or write, and the corresponding key and value pair. | ||
|
||
A `tracekv.Store` can also be instantiated with a `store.TraceContext` which | ||
A `trace.Store` can also be instantiated with a `store.TraceContext` which | ||
can allow each traced operation to include additional metadata, e.g. a block height | ||
or hash. | ||
|
||
Note, `tracekv.Store` is not meant to be branched or written to. The parent `KVStore` | ||
is responsible for all branching and writing operations, while a `tracekv.Store` | ||
Note, `trace.Store` is not meant to be branched or written to. The parent `KVStore` | ||
is responsible for all branching and writing operations, while a `trace.Store` | ||
wraps such a store and traces all relevant operations on it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
Package tracekv provides a KVStore implementation that wraps a parent KVStore | ||
Package trace provides a KVStore implementation that wraps a parent KVStore | ||
and allows all operations to be traced to an io.Writer. This can be useful to | ||
serve use cases such as tracing and digesting all read operations for a specific | ||
store key and key or value. | ||
*/ | ||
package tracekv | ||
package trace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package tracekv | ||
package trace | ||
|
||
import ( | ||
"io" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package tracekv | ||
package trace | ||
|
||
import ( | ||
"encoding/base64" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters