MCPcopy Create free account
hub / github.com/perkeep/perkeep / NewStorage

Function NewStorage

pkg/sorted/sqlite/sqlitekv.go:41–43  ·  view source on GitHub ↗

NewStorage is a convenience that calls newKeyValueFromConfig with file as the sqlite storage file.

(file string)

Source from the content-addressed store, hash-verified

39// NewStorage is a convenience that calls newKeyValueFromConfig
40// with file as the sqlite storage file.
41func NewStorage(file string) (sorted.KeyValue, error) {
42 return newKeyValueFromConfig(jsonconfig.Obj{"file": file})
43}
44
45func newKeyValueFromConfig(cfg jsonconfig.Obj) (sorted.KeyValue, error) {
46 file := cfg.RequiredString("file")

Callers 6

BenchmarkPopulateSQLiteFunction · 0.92
BenchmarkReindexSQLiteFunction · 0.92
BenchmarkInterruptSQLiteFunction · 0.92
BenchmarkAllSQLiteFunction · 0.92
TestChildIndexerFunction · 0.92

Calls 1

newKeyValueFromConfigFunction · 0.85

Tested by 6

BenchmarkPopulateSQLiteFunction · 0.74
BenchmarkReindexSQLiteFunction · 0.74
BenchmarkInterruptSQLiteFunction · 0.74
BenchmarkAllSQLiteFunction · 0.74
TestChildIndexerFunction · 0.74