replace Redis with an embedded SQLite string->string KV store (group commit, in-tx events, SQL search)
Build and Push Docker Image / build (push) Successful in 2m44s

This commit is contained in:
Worph
2026-10-19 20:51:00 +00:00
parent c53146e514
commit dc5cbdfb9b
80 changed files with 4601 additions and 6077 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ type ExportOptions struct {
SourceHost string
}
// Exporter writes snapshot ZIPs from a live Redis store.
// Exporter writes snapshot ZIPs from the live metadata store.
type Exporter struct {
storage *storage.Client
}
+3 -3
View File
@@ -8,7 +8,7 @@ import (
"strings"
)
// Flat keys use "/" as the separator. Property paths inside Redis are
// Flat keys use "/" as the separator. Property paths inside the store are
// stored as e.g. "fileinfo/streamdetails/video/0/codec".
const flatSep = "/"
@@ -33,7 +33,7 @@ func Reconstruct(flat map[string]string) interface{} {
}
// Flatten is the inverse of Reconstruct: walks a nested value and produces a
// flat property map whose values are all strings (Redis-ready).
// flat property map whose values are all strings (store-ready).
//
// Arrays become numeric path segments ("genre/0", "genre/1"). Nil/missing
// values are stored as "" to preserve the field's presence — this matches
@@ -127,7 +127,7 @@ func flattenInto(v interface{}, path string, out map[string]string) {
out[path] = ""
case map[string]interface{}:
if len(t) == 0 && path != "" {
// Empty objects don't have a Redis representation; skip.
// Empty objects don't have a flat-key representation; skip.
return
}
for k, child := range t {
+2 -2
View File
@@ -73,7 +73,7 @@ type ImportResult struct {
PluginOutput *PluginOutputResult `json:"pluginOutput,omitempty"`
}
// Importer applies snapshot ZIPs to a live Redis store.
// Importer applies snapshot ZIPs to the live metadata store.
type Importer struct {
storage *storage.Client
}
@@ -83,7 +83,7 @@ func NewImporter(stor *storage.Client) *Importer {
}
// Import reads a ZIP from r (which must support io.ReaderAt; callers pass
// *bytes.Reader after buffering the upload) and applies it to Redis.
// *bytes.Reader after buffering the upload) and applies it to the store.
func (i *Importer) Import(r io.ReaderAt, size int64, opts ImportOptions) (*ImportResult, error) {
if i.storage == nil || !i.storage.IsConnected() {
return nil, fmt.Errorf("storage not connected")
+1 -1
View File
@@ -16,7 +16,7 @@ type WipeResult struct {
MetadataDeleted int64 `json:"metadataDeleted"`
}
// Wiper clears metadata from Redis.
// Wiper clears metadata from the store.
type Wiper struct {
storage *storage.Client
}