aboutsummaryrefslogtreecommitdiff
path: root/object/store/mix/mix.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-25 14:30:31 +0000
committerGravatar Runxi Yu2026-03-25 14:30:31 +0000
commitbfa0a3f5f18b752a6ebd3d5b37411c6871f7bb17 (patch)
tree8ee2479273e2b34d284c30703c2be48efe197556 /object/store/mix/mix.go
parent*: Resort import order (diff)
signatureNo signature
*: objectstore -> object/store
Diffstat (limited to 'object/store/mix/mix.go')
-rw-r--r--object/store/mix/mix.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/object/store/mix/mix.go b/object/store/mix/mix.go
new file mode 100644
index 00000000..1149ad7b
--- /dev/null
+++ b/object/store/mix/mix.go
@@ -0,0 +1,20 @@
+// Package mix provides an adaptive wrapper over multiple object storage
+// backends.
+package mix
+
+import (
+ "sync"
+
+ "codeberg.org/lindenii/furgit/object/store"
+)
+
+// Mix queries multiple object databases with an MRU backend preference.
+//
+// Mix borrows its backend stores.
+type Mix struct {
+ mu sync.RWMutex
+
+ backendHead *backendNode
+ backendTail *backendNode
+ backendNodeByStore map[objectstore.Store]*backendNode
+}