MCPcopy Create free account
hub / github.com/openclaw/gogcli / WithRuntime

Function WithRuntime

internal/app/runtime.go:156–158  ·  view source on GitHub ↗
(ctx context.Context, runtime *Runtime)

Source from the content-addressed store, hash-verified

154type runtimeContextKey struct{}
155
156func WithRuntime(ctx context.Context, runtime *Runtime) context.Context {
157 return context.WithValue(ctx, runtimeContextKey{}, runtime)
158}
159
160func FromContext(ctx context.Context) (*Runtime, bool) {
161 runtime, ok := ctx.Value(runtimeContextKey{}).(*Runtime)

Calls

no outgoing calls