MCPcopy
hub / github.com/perkeep/perkeep / NewMemoryKeyValue

Function NewMemoryKeyValue

pkg/sorted/mem.go:33–37  ·  view source on GitHub ↗

NewMemoryKeyValue returns a KeyValue implementation that's backed only by memory. It's mostly useful for tests and development.

()

Source from the content-addressed store, hash-verified

31// NewMemoryKeyValue returns a KeyValue implementation that's backed only
32// by memory. It's mostly useful for tests and development.
33func NewMemoryKeyValue() KeyValue {
34 kv := new(memKeys)
35 kv.Wipe()
36 return kv
37}
38
39var _ Wiper = (*memKeys)(nil)
40

Callers 15

newHostFunction · 0.92
newTestStorageFunction · 0.92
TestStorageFunction · 0.92
TestReindexFunction · 0.92
testPackFunction · 0.92
TestSmallFallbackFunction · 0.92
TestRemoveBlobsFunction · 0.92
TestPackerBoundarySplitsFunction · 0.92
TestStreamBlobsFunction · 0.92
testStreamBlobsFunction · 0.92
TestMemoryKVFunction · 0.92

Calls 1

WipeMethod · 0.65

Tested by 15

newHostFunction · 0.74
newTestStorageFunction · 0.74
TestStorageFunction · 0.74
TestReindexFunction · 0.74
testPackFunction · 0.74
TestSmallFallbackFunction · 0.74
TestRemoveBlobsFunction · 0.74
TestPackerBoundarySplitsFunction · 0.74
TestStreamBlobsFunction · 0.74
testStreamBlobsFunction · 0.74
TestMemoryKVFunction · 0.74