diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-23 22:51:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-23 22:59:02 +0900 |
| commit | dd94818f20c7a37bdd7c6129551759db1b09b65e (patch) | |
| tree | 1ea7c94b3f6aec92f037a3e58dc343c3b00cd5a2 /internal/app/outcome.go | |
| parent | 0fd357e7f64ec029489bbbcc7935005a26cb9a13 (diff) | |
hst/instance: define instance state
This is now part of the hst API. This change also improves identifier generation and serialisation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/outcome.go')
| -rw-r--r-- | internal/app/outcome.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/internal/app/outcome.go b/internal/app/outcome.go index 30fd38ff..f462dfd5 100644 --- a/internal/app/outcome.go +++ b/internal/app/outcome.go @@ -8,7 +8,6 @@ import ( "hakurei.app/container" "hakurei.app/container/check" "hakurei.app/hst" - "hakurei.app/internal/app/state" "hakurei.app/message" "hakurei.app/system" "hakurei.app/system/acl" @@ -36,9 +35,9 @@ type outcomeState struct { Shim *shimParams // Generated and accounted for by the caller. - ID *state.ID + ID *hst.ID // Copied from ID. - id *stringPair[state.ID] + id *stringPair[hst.ID] // Copied from the [hst.Config] field of the same name. Identity int @@ -77,7 +76,7 @@ func (s *outcomeState) valid() bool { } // newOutcomeState returns the address of a new outcomeState with its exported fields populated via syscallDispatcher. -func newOutcomeState(k syscallDispatcher, msg message.Msg, id *state.ID, config *hst.Config, hsu *Hsu) *outcomeState { +func newOutcomeState(k syscallDispatcher, msg message.Msg, id *hst.ID, config *hst.Config, hsu *Hsu) *outcomeState { s := outcomeState{ Shim: &shimParams{PrivPID: k.getpid(), Verbose: msg.IsVerbose()}, ID: id, @@ -120,7 +119,7 @@ func (s *outcomeState) populateLocal(k syscallDispatcher, msg message.Msg) error s.k = k s.msg = msg - s.id = &stringPair[state.ID]{*s.ID, s.ID.String()} + s.id = &stringPair[hst.ID]{*s.ID, s.ID.String()} s.Copy(&s.sc, s.UserID) msg.Verbosef("process share directory at %q, runtime directory at %q", s.sc.SharePath, s.sc.RunDirPath) |
