mirror of
https://github.com/apple/container.git
synced 2026-09-12 10:45:42 +00:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user