Documentation
¶
Rendered for js/wasm
Overview ¶
Package store implements a kvtx.Store backed by OPFS flat files.
Each key-value pair is stored as a file in a sharded directory structure. Keys are base58-encoded as filenames, sharded by the first character. Values are the raw file contents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is an OPFS-backed key-value store implementing kvtx.Store.
func NewStore ¶
func NewStore(root *opfs.DirectoryHandle) (*Store, error)
NewStore creates a new OPFS store rooted at the given directory. It creates a "data" subdirectory for key-value storage.
func (*Store) GetStorageTally ¶
GetStorageTally returns the current storage tally in bytes.
Click to show internal directories.
Click to hide internal directories.