From 3ba67c27db0cf52b120e4f15c09047aa96d3bcb4 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 30 Mar 2026 18:18:06 +0000 Subject: object/store: Unify writers and fix naming --- object/store/quarantine.go | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'object/store/quarantine.go') diff --git a/object/store/quarantine.go b/object/store/quarantine.go index a9ba4f55..6db12084 100644 --- a/object/store/quarantine.go +++ b/object/store/quarantine.go @@ -1,17 +1,20 @@ package objectstore -// Quarantine is one quarantined write. It is intended to be embedded. +// WriterQuarantine represents one quarantined write that accepts both object- +// wise and pack-wise writes. type Quarantine interface { - // Reader exposes the objects written into this quarantine. - Reader + BaseQuarantine + Writer +} - // Promote publishes quarantined writes into their final destination. - // - // Promote invalidates the receiver. - Promote() error +// QuarantineOptions controls the options for one coordinated quarantine creation. +type QuarantineOptions struct { + Object ObjectQuarantineOptions + Pack PackQuarantineOptions +} - // Discard abandons quarantined writes. - // - // Discard invalidates the receiver. - Discard() error +// WriterQuarantiner creates coordinated quarantines that support both object- +// wise and pack-wise writes. +type Quarantiner interface { + BeginQuarantine(opts QuarantineOptions) (Quarantine, error) } -- cgit v1.3.1-10-gc9f91