diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-08 07:34:54 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-08 07:38:47 +0900 |
| commit | 0c38fb7b6a17bed9392a4cf46fc752bc2de8eb18 (patch) | |
| tree | 44a762beb44193693ada3c97c368e4f12a4ec054 /hst/fs.go | |
| parent | 357cfcddeea14d6babacf7ae8f77e0bad7b24ee5 (diff) | |
hst: expose daemon as fs entry
This is slightly counterintuitive, but it turned out well under this framework since the daemon backs its target file.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst/fs.go')
| -rw-r--r-- | hst/fs.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -45,6 +45,9 @@ type Ops interface { Root(host *check.Absolute, flags int) Ops // Etc appends an op that expands host /etc into a toplevel symlink mirror with /etc semantics. Etc(host *check.Absolute, prefix string) Ops + + // Daemon appends an op that starts a daemon in the container and blocks until target appears. + Daemon(target, path *check.Absolute, args ...string) Ops } // ApplyState holds the address of [Ops] and any relevant application state. @@ -124,6 +127,12 @@ func (f *FilesystemConfigJSON) MarshalJSON() ([]byte, error) { *FSLink }{fsType{FilesystemLink}, cv} + case *FSDaemon: + v = &struct { + fsType + *FSDaemon + }{fsType{FilesystemDaemon}, cv} + default: return nil, FSImplError{f.FilesystemConfig} } @@ -152,6 +161,9 @@ func (f *FilesystemConfigJSON) UnmarshalJSON(data []byte) error { case FilesystemLink: *f = FilesystemConfigJSON{new(FSLink)} + case FilesystemDaemon: + *f = FilesystemConfigJSON{new(FSDaemon)} + default: return FSTypeError(t.Type) } |
