hst/fs: interface filesystem config
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m14s
Test / Hakurei (push) Successful in 3m37s
Test / Hpkg (push) Successful in 4m27s
Test / Sandbox (race detector) (push) Successful in 4m23s
Test / Hakurei (race detector) (push) Successful in 5m22s
Test / Flake checks (push) Successful in 1m22s
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m14s
Test / Hakurei (push) Successful in 3m37s
Test / Hpkg (push) Successful in 4m27s
Test / Sandbox (race detector) (push) Successful in 4m23s
Test / Hakurei (race detector) (push) Successful in 5m22s
Test / Flake checks (push) Successful in 1m22s
This allows mount points to be represented by different underlying structs. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -51,8 +51,8 @@ type (
|
||||
|
||||
// pass through all devices
|
||||
Device bool `json:"device,omitempty"`
|
||||
// container host filesystem bind mounts
|
||||
Filesystem []FilesystemConfig `json:"filesystem"`
|
||||
// container mount points
|
||||
Filesystem []FilesystemConfigJSON `json:"filesystem"`
|
||||
// create symlinks inside container filesystem
|
||||
Link []LinkConfig `json:"symlink"`
|
||||
|
||||
@@ -68,20 +68,6 @@ type (
|
||||
AutoEtc bool `json:"auto_etc"`
|
||||
}
|
||||
|
||||
// FilesystemConfig is an abstract representation of a bind mount.
|
||||
FilesystemConfig struct {
|
||||
// mount point in container, same as src if empty
|
||||
Dst *container.Absolute `json:"dst,omitempty"`
|
||||
// host filesystem path to make available to the container
|
||||
Src *container.Absolute `json:"src"`
|
||||
// do not mount filesystem read-only
|
||||
Write bool `json:"write,omitempty"`
|
||||
// do not disable device files
|
||||
Device bool `json:"dev,omitempty"`
|
||||
// fail if the bind mount cannot be established for any reason
|
||||
Must bool `json:"require,omitempty"`
|
||||
}
|
||||
|
||||
LinkConfig struct {
|
||||
// symlink target in container
|
||||
Target *container.Absolute `json:"target"`
|
||||
|
||||
Reference in New Issue
Block a user