diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-12 04:38:45 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-14 04:52:49 +0900 |
| commit | 99ac96511bed17f48d908db3d00a1f48579ba011 (patch) | |
| tree | 30d404efb7256c9f053f64192068637d6b846db4 /hst/container.go | |
| parent | e99d7affb0c128fa82722f9b3d79c99b5e5918cd (diff) | |
hst/fs: interface filesystem config
This allows mount points to be represented by different underlying structs.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/container.go')
| -rw-r--r-- | hst/container.go | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/hst/container.go b/hst/container.go index 0b51e101..d42c72d2 100644 --- a/hst/container.go +++ b/hst/container.go @@ -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"` |
