mirror of
https://github.com/apple/container.git
synced 2026-09-12 10:45:42 +00:00
Allow runtime options for generic mounts (#334)
Make generic mounts more flexible by passing in runtime options and making the init function public Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
This commit is contained in:
@@ -43,10 +43,10 @@ public struct Mount: Sendable {
|
||||
public enum RuntimeOptions: Sendable {
|
||||
case virtioblk([String])
|
||||
case virtiofs([String])
|
||||
case any
|
||||
case any([String])
|
||||
}
|
||||
|
||||
init(
|
||||
public init(
|
||||
type: String,
|
||||
source: String,
|
||||
destination: String,
|
||||
@@ -98,14 +98,15 @@ public struct Mount: Sendable {
|
||||
type: String,
|
||||
source: String,
|
||||
destination: String,
|
||||
options: [String] = []
|
||||
options: [String] = [],
|
||||
runtimeOptions: [String] = []
|
||||
) -> Self {
|
||||
.init(
|
||||
type: type,
|
||||
source: source,
|
||||
destination: destination,
|
||||
options: options,
|
||||
runtimeOptions: .any
|
||||
runtimeOptions: .any(runtimeOptions)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user