Make some image/mounting related functions public (#335)

Make some image/mounting related functions public for use outside of
this repo

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
This commit is contained in:
Kathryn Baldauf
2025-10-16 14:03:23 -07:00
committed by GitHub
parent a0f860822a
commit 61049408dc
3 changed files with 9 additions and 2 deletions
@@ -45,4 +45,11 @@ public struct AttachedFilesystem: Sendable {
self.destination = mount.destination
}
#endif
public init(type: String, source: String, destination: String, options: [String]) {
self.type = type
self.source = source
self.destination = destination
self.options = options
}
}
+1 -1
View File
@@ -19,7 +19,7 @@
import Crypto
import ContainerizationError
func hashMountSource(source: String) throws -> String {
public func hashMountSource(source: String) throws -> String {
guard let data = source.data(using: .utf8) else {
throw ContainerizationError(.invalidArgument, message: "\(source) could not be converted to Data")
}
@@ -103,7 +103,7 @@ extension ImageStore {
/// - Note: It is assumed that the underlying manifests and blob layers for the image already exists in the `ContentStore` that the `ImageStore` was initialized with. This method is invoked when the `pull(...)` , `load(...)` and `tag(...)` methods are used.
/// - Returns: A `Containerization.Image`
@discardableResult
internal func create(description: Image.Description) async throws -> Image {
public func create(description: Image.Description) async throws -> Image {
try await self.lock.withLock { ctx in
try await self._create(description: description, lock: ctx)
}