diff options
| author | 2026-06-07 18:36:34 +0000 | |
|---|---|---|
| committer | 2026-06-07 18:40:57 +0000 | |
| commit | 90027fbe5e59f8c88d6bad834d3ba08632a9e511 (patch) | |
| tree | ed63d7cb60d5d932b518cf0e6d43a24fb844fba3 /object | |
| parent | object/store/chain: Add (diff) | |
object/store: Add CoordinatedQuarantine
Diffstat (limited to 'object')
| -rw-r--r-- | object/store/doc.go | 1 | ||||
| -rw-r--r-- | object/store/quarantiner.go | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/object/store/doc.go b/object/store/doc.go index f186f39f..40feea47 100644 --- a/object/store/doc.go +++ b/object/store/doc.go @@ -13,4 +13,5 @@ // Instead, we define distinct optional capabilities // for object-wise writes, pack-wise writes, etc., // and compose them for quarantined writes. +// However, a coordinated quarantine is defined as necessary. package store diff --git a/object/store/quarantiner.go b/object/store/quarantiner.go index 19fbdc0c..467d5c35 100644 --- a/object/store/quarantiner.go +++ b/object/store/quarantiner.go @@ -55,6 +55,14 @@ type PackQuarantiner interface { BeginPackQuarantine(opts PackQuarantineOptions) (PackQuarantine, error) } +// CoordinatedQuarantine represents one quarantine +// that accepts both object-wise and pack-wise writes +// behind a single Promote/Discard. +type CoordinatedQuarantine interface { + ObjectQuarantine + PackQuarantine +} + // CoordinatedQuarantineOptions controls the options // for one coordinated quarantine creation. type CoordinatedQuarantineOptions struct { @@ -69,8 +77,5 @@ type CoordinatedQuarantineOptions struct { // The returned quarantine is usable // anywhere either split quarantine is expected. type CoordinatedQuarantiner interface { - BeginCoordinatedQuarantine(opts CoordinatedQuarantineOptions) (interface { - ObjectQuarantine - PackQuarantine - }, error) + BeginCoordinatedQuarantine(opts CoordinatedQuarantineOptions) (CoordinatedQuarantine, error) } |
