Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for StatusIsNot (0.13 sec)

  1. 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)
  2. 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)
  3. pkg/kubelet/server/server.go

    func isLongRunningRequest(path string) bool {
    	_, ok := longRunningRequestPathMap[path]
    	return ok
    }
    
    var statusesNoTracePred = httplog.StatusIsNot(
    	http.StatusOK,
    	http.StatusFound,
    	http.StatusMovedPermanently,
    	http.StatusTemporaryRedirect,
    	http.StatusBadRequest,
    	http.StatusNotFound,
    	http.StatusSwitchingProtocols,
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 40.1K bytes
    - Viewed (0)
Back to top