返回 DeepSeek-Reasonix
runtime_owner.go
根目录 / internal / boot / runtime_owner.go
1 package boot
2
3 import (
4 "context"
5
6 "reasonix/internal/extension"
7 )
8
9 func bindRuntimeOwner(ctx context.Context, opts Options) (context.Context, Options, *extension.RuntimeOwner, func(string, bool, []byte)) {
10 owner := opts.Owner
11 if owner == nil {
12 owner = extension.NewRuntimeOwner()
13 opts.Owner = owner
14 }
15 ctx = extension.ContextWithRuntimeOwner(ctx, owner)
16 recordFileWrite := func(path string, hadPrior bool, prior []byte) {
17 owner.RecordFileWrite(path, hadPrior, prior)
18 }
19 return ctx, opts, owner, recordFileWrite
20 }
21
21 lines GO