hst/instance: embed config struct
Some checks failed
Test / Create distribution (push) Successful in 33s
Test / Sandbox (push) Successful in 2m11s
Test / Hakurei (push) Failing after 2m40s
Test / Sandbox (race detector) (push) Successful in 3m54s
Test / Hpkg (push) Failing after 3m58s
Test / Hakurei (race detector) (push) Failing after 4m11s
Test / Flake checks (push) Has been skipped

This makes the resulting json easier to parse since it can now be deserialised into the config struct.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
Ophestra 2025-10-23 23:25:46 +09:00
parent 05488bfb8f
commit 71f748557d
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q
2 changed files with 275 additions and 279 deletions

View File

@ -189,7 +189,6 @@ App
"instance": "8e2c76b066dabe574cf073bdb46eb5c1", "instance": "8e2c76b066dabe574cf073bdb46eb5c1",
"pid": 3405691582, "pid": 3405691582,
"shim_pid": 3735928559, "shim_pid": 3735928559,
"config": {
"id": "org.chromium.Chromium", "id": "org.chromium.Chromium",
"enablements": { "enablements": {
"wayland": true, "wayland": true,
@ -336,7 +335,6 @@ App
"device": true, "device": true,
"share_runtime": true, "share_runtime": true,
"share_tmpdir": true "share_tmpdir": true
}
}, },
"time": "1970-01-01T00:00:00.000000009Z" "time": "1970-01-01T00:00:00.000000009Z"
} }
@ -537,7 +535,6 @@ func TestPrintPs(t *testing.T) {
"instance": "8e2c76b066dabe574cf073bdb46eb5c1", "instance": "8e2c76b066dabe574cf073bdb46eb5c1",
"pid": 3405691582, "pid": 3405691582,
"shim_pid": 3735928559, "shim_pid": 3735928559,
"config": {
"id": "org.chromium.Chromium", "id": "org.chromium.Chromium",
"enablements": { "enablements": {
"wayland": true, "wayland": true,
@ -684,7 +681,6 @@ func TestPrintPs(t *testing.T) {
"device": true, "device": true,
"share_runtime": true, "share_runtime": true,
"share_tmpdir": true "share_tmpdir": true
}
}, },
"time": "1970-01-01T00:00:00.000000009Z" "time": "1970-01-01T00:00:00.000000009Z"
} }

View File

@ -80,7 +80,7 @@ type State struct {
ShimPID int `json:"shim_pid"` ShimPID int `json:"shim_pid"`
// Configuration used to start the container. // Configuration used to start the container.
Config *Config `json:"config"` *Config
// Point in time the shim process was created. // Point in time the shim process was created.
Time time.Time `json:"time"` Time time.Time `json:"time"`