Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for WithWarningRecorder (0.19 sec)

  1. staging/src/k8s.io/apiserver/pkg/warning/context.go

    	// text must be valid UTF-8, and must not contain control characters.
    	AddWarning(agent, text string)
    }
    
    // WithWarningRecorder returns a new context that wraps the provided context and contains the provided Recorder implementation.
    // The returned context can be passed to AddWarning().
    func WithWarningRecorder(ctx context.Context, recorder Recorder) context.Context {
    	return context.WithValue(ctx, warningRecorderKey, recorder)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 24 16:37:53 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/endpoints/filters/warning.go

    	"k8s.io/apiserver/pkg/warning"
    )
    
    // WithWarningRecorder attaches a deduplicating k8s.io/apiserver/pkg/warning#WarningRecorder to the request context.
    func WithWarningRecorder(handler http.Handler) http.Handler {
    	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
    		recorder := &recorder{writer: w}
    		req = req.WithContext(warning.WithWarningRecorder(req.Context(), recorder))
    		handler.ServeHTTP(w, req)
    	})
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 01 16:14:06 UTC 2020
    - 3.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/authentication/request/bearertoken/bearertoken_test.go

    		},
    	}
    
    	for k, tc := range tests {
    		dc := dummyRecorder{agent: "", text: ""}
    		ctx := genericapirequest.NewDefaultContext()
    		ctxWithRecorder := warning.WithWarningRecorder(ctx, &dc)
    		req, _ := http.NewRequestWithContext(ctxWithRecorder, "GET", "/", nil)
    		for _, h := range tc.AuthorizationHeaders {
    			req.Header.Add("Authorization", h)
    		}
    
    		bearerAuth := New(tc.TokenAuth)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 25 13:22:28 UTC 2022
    - 8.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/authentication/token/cache/cached_token_authenticator.go

    		defer cancel()
    
    		if audsOk {
    			ctx = authenticator.WithAudiences(ctx, auds)
    		}
    		recorder := &recorder{}
    		ctx = warning.WithWarningRecorder(ctx, recorder)
    
    		ctx = audit.WithAuditContext(ctx)
    		ac := audit.AuditContextFrom(ctx)
    		// since this is shared work between multiple requests, we have no way of knowing if any
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 16:16:51 UTC 2023
    - 9.8K bytes
    - Viewed (0)
Back to top