diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-30 18:43:55 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-30 18:43:55 +0900 |
| commit | ebdcff1049fb979405677a823a47410df7ee7c4f (patch) | |
| tree | a5a14d409e4bc9f3b4b2e2c15f6c23de5ad0755f /internal/outcome | |
| parent | 46c5ce493638ea2d034bbbdb9449e93b66d0330f (diff) | |
internal/store: rename from state
This reduces collision with local variable names, and generally makes sense for the new store package, since it no longer specifies the state struct.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome')
| -rw-r--r-- | internal/outcome/process.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/outcome/process.go b/internal/outcome/process.go index 6ed419a1..2dc76538 100644 --- a/internal/outcome/process.go +++ b/internal/outcome/process.go @@ -15,7 +15,7 @@ import ( "hakurei.app/container/fhs" "hakurei.app/hst" "hakurei.app/internal" - "hakurei.app/internal/state" + "hakurei.app/internal/store" "hakurei.app/message" "hakurei.app/system" ) @@ -34,7 +34,7 @@ type mainState struct { // Time is nil if no process was ever created. Time *time.Time - store state.Store + store store.Store cancel context.CancelFunc cmd *exec.Cmd cmdWait chan error @@ -127,7 +127,7 @@ func (ms mainState) beforeExit(isFault bool) { } if ms.uintptr&mainNeedsRevert != 0 { - if ok, err := ms.store.Do(ms.k.state.identity.unwrap(), func(c state.Cursor) { + if ok, err := ms.store.Do(ms.k.state.identity.unwrap(), func(c store.Cursor) { if ms.uintptr&mainNeedsDestroy != 0 { if err := c.Destroy(ms.k.state.id.unwrap()); err != nil { perror(err, "destroy state entry") @@ -220,7 +220,7 @@ func (k *outcome) main(msg message.Msg) { ms.fatal("cannot commit system setup:", err) } ms.uintptr |= mainNeedsRevert - ms.store = state.NewMulti(msg, k.state.sc.RunDirPath) + ms.store = store.NewMulti(msg, k.state.sc.RunDirPath) ctx, cancel := context.WithCancel(k.ctx) defer cancel() @@ -281,7 +281,7 @@ func (k *outcome) main(msg message.Msg) { } // shim accepted setup payload, create process state - if ok, err := ms.store.Do(k.state.identity.unwrap(), func(c state.Cursor) { + if ok, err := ms.store.Do(k.state.identity.unwrap(), func(c store.Cursor) { if err := c.Save(&hst.State{ ID: k.state.id.unwrap(), PID: os.Getpid(), |
