- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for WithLatencyTrackersAndCustomClock (0.4 sec)
-
staging/src/k8s.io/apiserver/pkg/endpoints/request/webhook_duration.go
func WithLatencyTrackers(parent context.Context) context.Context { return WithLatencyTrackersAndCustomClock(parent, clock.RealClock{}) } // WithLatencyTrackersAndCustomClock returns a copy of parent context to which // an instance of LatencyTrackers is added. Tracers use given clock. func WithLatencyTrackersAndCustomClock(parent context.Context, c clock.Clock) context.Context {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 13 22:15:37 UTC 2024 - 11.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/request/webhook_duration_test.go
parent := context.TODO() _, ok := LatencyTrackersFrom(parent) if ok { t.Error("expected LatencyTrackersFrom to not be initialized") } clk := clocktesting.FakeClock{} ctx := WithLatencyTrackersAndCustomClock(parent, &clk) wd, ok := LatencyTrackersFrom(ctx) if !ok { t.Error("expected LatencyTrackersFrom to be initialized") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Mar 14 09:15:20 UTC 2023 - 2.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin_test.go
for _, test := range webhooktesting.NewValidationDurationTestCases(serverURL) { ts.Run(test.Name, func(t *testing.T) { ctx := context.TODO() if test.InitContext { ctx = request.WithLatencyTrackersAndCustomClock(ctx, &clk) } wh, err := NewMutatingWebhook(nil) if err != nil { t.Errorf("failed to create mutating webhook: %v", err) return } ns := "webhook-test"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:06:52 UTC 2024 - 11K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin_test.go
for _, test := range webhooktesting.NewValidationDurationTestCases(serverURL) { ts.Run(test.Name, func(t *testing.T) { ctx := context.TODO() if test.InitContext { ctx = request.WithLatencyTrackersAndCustomClock(ctx, &clk) } wh, err := NewValidatingAdmissionWebhook(nil) if err != nil { t.Errorf("failed to create mutating webhook: %v", err) return } ns := "webhook-test"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:06:52 UTC 2024 - 11.9K bytes - Viewed (0)