diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-01-21 12:10:58 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-01-21 12:10:58 +0900 |
| commit | dfcdc5ce20fb163a729efc0ea960480dff129eae (patch) | |
| tree | bfff30426a461ea1b69e89be295086d7a3f528da /internal/app/start.go | |
| parent | fa0616b2748e363fee23c9cd1a01f286f6dba73c (diff) | |
state: store config in separate gob stream
This enables early serialisation of config.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/start.go')
| -rw-r--r-- | internal/app/start.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/internal/app/start.go b/internal/app/start.go index 1825d9a8..87bb6fde 100644 --- a/internal/app/start.go +++ b/internal/app/start.go @@ -89,16 +89,15 @@ func (a *app) Run(ctx context.Context, rs *RunState) error { // shim accepted setup payload, create process state sd := state.State{ - ID: *a.id, - PID: a.shim.Unwrap().Process.Pid, - Config: a.ct.Unwrap(), - Time: *startTime, + ID: *a.id, + PID: a.shim.Unwrap().Process.Pid, + Time: *startTime, } // register process state var err0 = new(StateStoreError) err0.Inner, err0.DoErr = a.seal.store.Do(a.seal.sys.user.aid, func(c state.Cursor) { - err0.InnerErr = c.Save(&sd) + err0.InnerErr = c.Save(&sd, a.seal.ct) }) a.seal.sys.saveState = true if err = err0.equiv("cannot save process state:"); err != nil { |
