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