@@ -22,7 +22,7 @@ import ContainerizationOCI
22
22
import Foundation
23
23
24
24
extension ImageStore {
25
- internal struct ImportOperation {
25
+ public struct ImportOperation: Sendable {
26
26
static let decoder = JSONDecoder ( )
27
27
28
28
let client : ContentClient
@@ -31,7 +31,7 @@ extension ImageStore {
31
31
let progress : ProgressHandler ?
32
32
let name : String
33
33
34
- init ( name: String , contentStore: ContentStore , client: ContentClient , ingestDir: URL , progress: ProgressHandler ? = nil ) {
34
+ public init ( name: String , contentStore: ContentStore , client: ContentClient , ingestDir: URL , progress: ProgressHandler ? = nil ) {
35
35
self . client = client
36
36
self . ingestDir = ingestDir
37
37
self . contentStore = contentStore
@@ -40,7 +40,7 @@ extension ImageStore {
40
40
}
41
41
42
42
/// Pull the required image layers for the provided descriptor and platform(s) into the given directory using the provided client. Returns a descriptor to the Index manifest.
43
- internal func `import`( root: Descriptor , matcher: ( ContainerizationOCI . Platform ) -> Bool ) async throws -> Descriptor {
43
+ public func `import`( root: Descriptor , matcher: ( ContainerizationOCI . Platform ) -> Bool ) async throws -> Descriptor {
44
44
var toProcess = [ root]
45
45
while !toProcess. isEmpty {
46
46
// Count the total number of blobs and their size
@@ -123,14 +123,14 @@ extension ImageStore {
123
123
for _ in 0 ..< 8 {
124
124
if let desc = iterator. next ( ) {
125
125
group. addTask {
126
- try await fetch ( desc)
126
+ try await self . fetch ( desc)
127
127
}
128
128
}
129
129
}
130
130
for try await _ in group {
131
131
if let desc = iterator. next ( ) {
132
132
group. addTask {
133
- try await fetch ( desc)
133
+ try await self . fetch ( desc)
134
134
}
135
135
}
136
136
}
0 commit comments