- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 16 for withValues (0.2 sec)
-
hack/golangci.yaml
contextual k8s.io/kubernetes/pkg/scheduler/.* contextual k8s.io/kubernetes/test/e2e/dra/.* # As long as contextual logging is alpha or beta, all WithName, WithValues, # NewContext calls have to go through klog. Once it is GA, we can lift # this restriction. Whether we then do a global search/replace remains # to be decided. with-helpers .*
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 15 12:10:09 UTC 2024 - 9.8K bytes - Viewed (0) -
src/context/x_test.go
t.Errorf("c.String() = %q want %q", got, want) } c3 := WithValue(c2, k3, "c3k3") check(c3, "c2", "c1k1", "c2k2", "c3k3") c4 := WithValue(c3, k1, nil) check(c4, "c4", "", "c2k2", "c3k3") o0 := otherContext{Background()} check(o0, "o0", "", "", "") o1 := otherContext{WithValue(Background(), k1, "c1k1")}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 26.3K bytes - Viewed (0) -
src/context/context.go
// packages using context. Users of WithValue should define their own // types for keys. To avoid allocating when assigning to an // interface{}, context keys often have concrete type // struct{}. Alternatively, exported context key variables' static // type should be a pointer or interface. func WithValue(parent Context, key, val any) Context { if parent == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 23.7K bytes - Viewed (0) -
internal/grid/handlers.go
if err != nil { return resp, err } switch any(req).(type) { case *MSS, *URLValues: ctx = context.WithValue(ctx, TraceParamsKey{}, req) case *NoPayload, *Bytes: // do not need to trace nopayload and bytes payload default: ctx = context.WithValue(ctx, TraceParamsKey{}, fmt.Sprintf("type=%T", req)) } if h.callReuseReq { defer h.recycleReq(req) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:51:27 UTC 2024 - 27.1K bytes - Viewed (0) -
internal/dsync/drwmutex.go
// Also, pass the trace context info if found for debugging netLockCtx := context.Background() tc, ok := ctx.Value(mcontext.ContextTraceKey).(*mcontext.TraceCtxt) if ok { netLockCtx = context.WithValue(netLockCtx, mcontext.ContextTraceKey, tc) } for index, c := range restClnts { wg.Add(1) // broadcast lock request to all nodes go func(index int, isReadLock bool, c NetLocker) { defer wg.Done()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 19.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/request/webhook_duration.go
// an instance of LatencyTrackers is added. Tracers use given clock. func WithLatencyTrackersAndCustomClock(parent context.Context, c clock.Clock) context.Context { return WithValue(parent, latencyTrackersKey, &LatencyTrackers{ MutatingWebhookTracker: newSumLatencyTracker(c), ValidatingWebhookTracker: newMaxLatencyTracker(c), APFQueueWaitTracker: newMaxLatencyTracker(c),
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 13 22:15:37 UTC 2024 - 11.5K bytes - Viewed (0) -
src/net/http/fcgi/child.go
c.conn.writeRecord(typeStderr, req.reqId, []byte(err.Error())) } else { httpReq.Body = body withoutUsedEnvVars := filterOutUsedEnvVars(req.params) envVarCtx := context.WithValue(httpReq.Context(), envVarsContextKey{}, withoutUsedEnvVars) httpReq = httpReq.WithContext(envVarCtx) c.handler.ServeHTTP(r, httpReq) } // Make sure we serve something even if nothing was written to r r.Write(nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 10.3K bytes - Viewed (0) -
src/cmd/go/script_test.go
type testingTBKey struct{} // tbContext returns a Context derived from ctx and associated with t. func tbContext(ctx context.Context, t testing.TB) context.Context { return context.WithValue(ctx, testingTBKey{}, t) } // tbFromContext returns the testing.TB associated with ctx, if any. func tbFromContext(ctx context.Context) (testing.TB, bool) { t := ctx.Value(testingTBKey{}) if t == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 18:15:22 UTC 2024 - 12.2K bytes - Viewed (0) -
cmd/admin-handlers-config-kv.go
if err != nil { return } tgts, err := config.ParseConfigTargetID(bytes.NewReader(kvBytes)) if err != nil { return } ctx = context.WithValue(ctx, config.ContextKeyForTargetFromConfig, tgts) if verr := validateConfig(ctx, result.Cfg, result.SubSys); verr != nil { err = badConfigErr{Err: verr} return }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 15.7K bytes - Viewed (0) -
src/crypto/tls/quic_test.go
t.Fatalf("error during connection handshake: %v", err) } } func TestQUICStartContextPropagation(t *testing.T) { const key = "key" const value = "value" ctx := context.WithValue(context.Background(), key, value) config := testConfig.Clone() config.MinVersion = VersionTLS13 calls := 0 config.GetConfigForClient = func(info *ClientHelloInfo) (*Config, error) { calls++
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 17:23:54 UTC 2024 - 19.3K bytes - Viewed (0)