Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for InstallPathHandler (0.42 sec)

  1. staging/src/k8s.io/apiserver/pkg/server/healthz/healthz.go

    	InstallPathHandler(mux, "/livez", checks...)
    }
    
    // InstallPathHandler registers handlers for health checking on
    // a specific path to mux. *All handlers* for the path must be
    // specified in exactly one call to InstallPathHandler. Calling
    // InstallPathHandler more than once for the same path and mux will
    // result in a panic.
    func InstallPathHandler(mux mux, path string, checks ...HealthChecker) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/server/healthz/healthz_test.go

    	}
    	if w.Body.String() != "ok" {
    		t.Errorf("expected %v, got %v", "ok", w.Body.String())
    	}
    }
    
    func TestInstallPathHandler(t *testing.T) {
    	mux := http.NewServeMux()
    	InstallPathHandler(mux, "/healthz/test")
    	InstallPathHandler(mux, "/healthz/ready")
    	req, err := http.NewRequest("GET", "http://example.com/healthz/test", nil)
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    	w := httptest.NewRecorder()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 15 20:43:16 UTC 2023
    - 11.4K bytes
    - Viewed (0)
Back to top