aboutsummaryrefslogtreecommitdiff
path: root/object/store
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-30 18:07:18 +0000
committerGravatar Runxi Yu2026-03-30 18:07:18 +0000
commit33a57ddd6fd9fbe4c01afa1fc70051a91b6d81fc (patch)
tree0bd96860a45be68dea0b42cb4d3b3ec4a9f07a28 /object/store
parentobject/store/dual: Add a basic dual composr (diff)
signatureNo signature
object/store: Hybrid quarantine interface
Diffstat (limited to 'object/store')
-rw-r--r--object/store/doc.go4
-rw-r--r--object/store/quarantine_writer.go21
2 files changed, 24 insertions, 1 deletions
diff --git a/object/store/doc.go b/object/store/doc.go
index cf1ac27d..45acc47c 100644
--- a/object/store/doc.go
+++ b/object/store/doc.go
@@ -9,7 +9,9 @@
// very different write models: writing one loose object is natural, while
// writing one object into a packfile backend is wasteful. Instead, we define
// distinct optional capabilities for object-wise writes, pack-wise writes,
-// and compose them against quarantined writes.
+// and compose them against quarantined writes. Where one logical quarantine
+// supports multiple write shapes together, this package also defines a
+// coordinated writer quarantine capability.
//
// Concrete implementations generally inherit the contract documented by the
// interfaces they satisfy. Implementation docs focus on additional guarantees
diff --git a/object/store/quarantine_writer.go b/object/store/quarantine_writer.go
new file mode 100644
index 00000000..f5656a8c
--- /dev/null
+++ b/object/store/quarantine_writer.go
@@ -0,0 +1,21 @@
+package objectstore
+
+// WriterQuarantine represents one quarantined write that accepts both object-
+// wise and pack-wise writes.
+type WriterQuarantine interface {
+ Quarantine
+ ObjectWriter
+ PackWriter
+}
+
+// QuarantineOptions controls the options for one coordinated quarantine creation.
+type QuarantineOptions struct {
+ Object ObjectQuarantineOptions
+ Pack PackQuarantineOptions
+}
+
+// WriterQuarantiner creates coordinated quarantines that support both object-
+// wise and pack-wise writes.
+type WriterQuarantiner interface {
+ BeginQuarantine(opts QuarantineOptions) (WriterQuarantine, error)
+}