From 0c38fb7b6a17bed9392a4cf46fc752bc2de8eb18 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 8 Dec 2025 07:34:54 +0900 Subject: 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 --- hst/fs.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'hst/fs.go') diff --git a/hst/fs.go b/hst/fs.go index 926d6233..3cecac88 100644 --- a/hst/fs.go +++ b/hst/fs.go @@ -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) } -- cgit v1.3.1