Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 71 for withValues (0.15 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unusedresult/unusedresult.go

    	// effectively redundant wrt the lostcancel analyzer.
    	funcs = stringSetFlag{
    		"context.WithCancel":   true,
    		"context.WithDeadline": true,
    		"context.WithTimeout":  true,
    		"context.WithValue":    true,
    		"errors.New":           true,
    		"fmt.Errorf":           true,
    		"fmt.Sprint":           true,
    		"fmt.Sprintf":          true,
    		"slices.Clip":          true,
    		"slices.Compact":       true,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. cmd/http-tracer.go

    		tc := mcontext.TraceCtxt{
    			AmzReqID:         w.Header().Get(xhttp.AmzRequestID),
    			RequestRecorder:  reqRecorder,
    			ResponseRecorder: respRecorder,
    		}
    
    		r = r.WithContext(context.WithValue(r.Context(), mcontext.ContextTraceKey, &tc))
    
    		reqStartTime := time.Now().UTC()
    		h.ServeHTTP(respRecorder, r)
    		reqEndTime := time.Now().UTC()
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 03 15:45:54 UTC 2024
    - 6K bytes
    - Viewed (0)
  3. src/net/http/http.go

    // shouldn't try to use it.
    var omitBundledHTTP2 bool
    
    // TODO(bradfitz): move common stuff here. The other files have accumulated
    // generic http stuff in random places.
    
    // contextKey is a value for use with context.WithValue. It's used as
    // a pointer so it fits in an interface{} without allocation.
    type contextKey struct {
    	name string
    }
    
    func (k *contextKey) String() string { return "net/http context value " + k.name }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/audit/context.go

    func WithAuditContext(parent context.Context) context.Context {
    	if AuditContextFrom(parent) != nil {
    		return parent // Avoid double registering.
    	}
    
    	return genericapirequest.WithValue(parent, auditKey, &AuditContext{})
    }
    
    // AuditEventFrom returns the audit event struct on the ctx
    func AuditEventFrom(ctx context.Context) *auditinternal.Event {
    	if ac := AuditContextFrom(ctx); ac.Enabled() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  5. pkg/volume/csi/csi_util.go

    func createCSIOperationContext(volumeSpec *volume.Spec, timeout time.Duration) (context.Context, context.CancelFunc) {
    	migrated := false
    	if volumeSpec != nil {
    		migrated = volumeSpec.Migrated
    	}
    	ctx := context.WithValue(context.Background(), additionalInfoKey, additionalInfo{Migrated: strconv.FormatBool(migrated)})
    	return context.WithTimeout(ctx, timeout)
    }
    
    // getPodInfoAttrs returns pod info for NodePublish
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 28 17:14:00 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  6. src/runtime/trace/annotation.go

    //	}()
    func NewTask(pctx context.Context, taskType string) (ctx context.Context, task *Task) {
    	pid := fromContext(pctx).id
    	id := newID()
    	userTaskCreate(id, pid, taskType)
    	s := &Task{id: id}
    	return context.WithValue(pctx, traceContextKey{}, s), s
    
    	// We allocate a new task even when
    	// the tracing is disabled because the context and task
    	// can be used across trace enable/disable boundaries,
    	// which complicates the problem.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 20 00:47:09 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  7. src/context/example_test.go

    		if v := ctx.Value(k); v != nil {
    			fmt.Println("found value:", v)
    			return
    		}
    		fmt.Println("key not found:", k)
    	}
    
    	k := favContextKey("language")
    	ctx := context.WithValue(context.Background(), k, "Go")
    
    	f(ctx, k)
    	f(ctx, favContextKey("color"))
    
    	// Output:
    	// found value: Go
    	// key not found: color
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 21 20:24:28 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  8. src/net/http/export_test.go

    	defer s.mu.Unlock()
    	for c := range s.activeConn {
    		st, _ := c.getState()
    		states[st] += 1
    	}
    	return states
    }
    
    func (r *Request) WithT(t *testing.T) *Request {
    	return r.WithContext(context.WithValue(r.Context(), tLogKey{}, t.Logf))
    }
    
    func ExportSetH2GoawayTimeout(d time.Duration) (restore func()) {
    	old := http2goAwayTimeout
    	http2goAwayTimeout = d
    	return func() { http2goAwayTimeout = old }
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:11:57 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/endpoints/request/requestinfo.go

    const requestInfoKey requestInfoKeyType = iota
    
    // WithRequestInfo returns a copy of parent in which the request info value is set
    func WithRequestInfo(parent context.Context, info *RequestInfo) context.Context {
    	return WithValue(parent, requestInfoKey, info)
    }
    
    // RequestInfoFrom returns the value of the RequestInfo key on the ctx
    func RequestInfoFrom(ctx context.Context) (*RequestInfo, bool) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 23 13:24:29 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/httplog/httplog.go

    			startTime = receivedTimestamp
    		}
    
    		rl := newLoggedWithStartTime(req, w, startTime)
    		rl.StacktraceWhen(stackTracePred)
    		req = req.WithContext(context.WithValue(ctx, respLoggerContextKey, rl))
    		defer rl.Log()
    
    		w = responsewriter.WrapForHTTP1Or2(rl)
    		handler.ServeHTTP(w, req)
    	})
    }
    
    // respLoggerFromContext returns the respLogger or nil.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 07 10:10:35 UTC 2023
    - 9.7K bytes
    - Viewed (0)
Back to top