···11+package objectstore
22+33+// BaseQuarantine is one quarantined write. It is intended to be embedded.
44+type BaseQuarantine interface {
55+ // Reader exposes the objects written into this quarantine.
66+ Reader
77+88+ // Promote publishes quarantined writes into their final destination.
99+ //
1010+ // Promote invalidates the receiver.
1111+ Promote() error
1212+1313+ // Discard abandons quarantined writes.
1414+ //
1515+ // Discard invalidates the receiver.
1616+ Discard() error
1717+}
···11package objectstore
2233-// Quarantine is one quarantined write. It is intended to be embedded.
33+// WriterQuarantine represents one quarantined write that accepts both object-
44+// wise and pack-wise writes.
45type Quarantine interface {
55- // Reader exposes the objects written into this quarantine.
66- Reader
66+ BaseQuarantine
77+ Writer
88+}
7988- // Promote publishes quarantined writes into their final destination.
99- //
1010- // Promote invalidates the receiver.
1111- Promote() error
1010+// QuarantineOptions controls the options for one coordinated quarantine creation.
1111+type QuarantineOptions struct {
1212+ Object ObjectQuarantineOptions
1313+ Pack PackQuarantineOptions
1414+}
12151313- // Discard abandons quarantined writes.
1414- //
1515- // Discard invalidates the receiver.
1616- Discard() error
1616+// WriterQuarantiner creates coordinated quarantines that support both object-
1717+// wise and pack-wise writes.
1818+type Quarantiner interface {
1919+ BeginQuarantine(opts QuarantineOptions) (Quarantine, error)
1720}
-21
object/store/quarantine_writer.go
···11-package objectstore
22-33-// WriterQuarantine represents one quarantined write that accepts both object-
44-// wise and pack-wise writes.
55-type WriterQuarantine interface {
66- Quarantine
77- ObjectWriter
88- PackWriter
99-}
1010-1111-// QuarantineOptions controls the options for one coordinated quarantine creation.
1212-type QuarantineOptions struct {
1313- Object ObjectQuarantineOptions
1414- Pack PackQuarantineOptions
1515-}
1616-1717-// WriterQuarantiner creates coordinated quarantines that support both object-
1818-// wise and pack-wise writes.
1919-type WriterQuarantiner interface {
2020- BeginQuarantine(opts QuarantineOptions) (WriterQuarantine, error)
2121-}
+8
object/store/writer.go
···11+package objectstore
22+33+// Writer represents a store that could perform both pack ingestions
44+// and individual object writes.
55+type Writer interface {
66+ PackWriter
77+ ObjectWriter
88+}