Skip to content

Commit b9f6e5e

Browse files
committed
image, storage: expose the underlying SplitFDStreamStore
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
1 parent 5cbdc9a commit b9f6e5e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

image/storage/storage_src.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,3 +509,13 @@ func (s *storageImageSource) getSize() (int64, error) {
509509
func (s *storageImageSource) Size() (int64, error) {
510510
return s.getSize()
511511
}
512+
513+
// SplitFDStreamSocket returns a socket for splitfdstream operations,
514+
// if the underlying store supports it.
515+
func (s *storageImageSource) SplitFDStreamSocket() (*os.File, error) {
516+
sfds, ok := s.imageRef.transport.store.(storage.SplitFDStreamStore)
517+
if !ok {
518+
return nil, fmt.Errorf("store does not support splitfdstream")
519+
}
520+
return sfds.SplitFDStreamSocket()
521+
}

0 commit comments

Comments
 (0)