Skip to content

Commit 06ab9ae

Browse files
committed
driver: add Close() method to Differ
Signed-off-by: Giuseppe Scrivano <[email protected]>
1 parent d421399 commit 06ab9ae

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/driver.go

+1
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ type DifferOptions struct {
267267
// This API is experimental and can be changed without bumping the major version number.
268268
type Differ interface {
269269
ApplyDiff(dest string, options *archive.TarOptions, differOpts *DifferOptions) (DriverWithDifferOutput, error)
270+
Close() error
270271
}
271272

272273
// DriverWithDiffer is the interface for direct diff access.

pkg/chunked/storage_linux.go

+4
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ func (c *chunkedDiffer) convertTarToZstdChunked(destDirectory string, payload *o
193193
return copied, newSeekableFile(f), convertedOutputDigester.Digest(), newAnnotations, nil
194194
}
195195

196+
func (c *chunkedDiffer) Close() error {
197+
return nil
198+
}
199+
196200
// GetDiffer returns a differ than can be used with ApplyDiffWithDiffer.
197201
// If it returns an error that matches ErrFallbackToOrdinaryLayerDownload, the caller can
198202
// retry the operation with a different method.

0 commit comments

Comments
 (0)