- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for StatusIsNot (0.18 sec)
-
staging/src/k8s.io/apiserver/pkg/server/httplog/httplog.go
rl.mutex.Lock() defer rl.mutex.Unlock() rl.logStacktracePred = pred return rl } // StatusIsNot returns a StacktracePred which will cause stacktraces to be logged // for any status *not* in the given list. func StatusIsNot(statuses ...int) StacktracePred { statusesNoTrace := map[int]bool{} for _, s := range statuses { statusesNoTrace[s] = true }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Aug 07 10:10:35 UTC 2023 - 9.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/httplog/httplog_test.go
}{ {http.StatusOK, []int{}, true}, {http.StatusOK, []int{http.StatusOK}, false}, {http.StatusCreated, []int{http.StatusOK, http.StatusAccepted}, true}, } for _, tt := range statusTestTable { sp := StatusIsNot(tt.statuses...) got := sp(tt.status) if got != tt.want { t.Errorf("Expected %v, got %v", tt.want, got) } } } func TestWithLogging(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Oct 05 18:05:09 UTC 2021 - 6.2K bytes - Viewed (0)