Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for InstallHandler (1.19 sec)

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

    	return &healthzCheck{name, check}
    }
    
    // InstallHandler registers handlers for health checking on the path
    // "/healthz" to mux. *All handlers* for mux must be specified in
    // exactly one call to InstallHandler. Calling InstallHandler more
    // than once for the same mux will result in a panic.
    func InstallHandler(mux mux, checks ...HealthChecker) {
    	InstallPathHandler(mux, "/healthz", checks...)
    }
    
    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.go

    */
    
    package server
    
    import (
    	"fmt"
    	"net/http"
    	"sync"
    	"time"
    
    	"k8s.io/apiserver/pkg/server/healthz"
    	"k8s.io/utils/clock"
    )
    
    // healthMux is an interface describing the methods InstallHandler requires.
    type healthMux interface {
    	Handle(pattern string, handler http.Handler)
    }
    
    type healthCheckRegistry struct {
    	path            string
    	lock            sync.Mutex
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/server/healthz/doc.go

    limitations under the License.
    */
    
    // Package healthz implements basic http server health checking.
    // Usage:
    //
    //	import "k8s.io/apiserver/pkg/server/healthz"
    //	healthz.InstallHandler(mux)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 792 bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/server/healthz/healthz_test.go

    	"k8s.io/apiserver/pkg/endpoints/metrics"
    	"k8s.io/component-base/metrics/legacyregistry"
    	"k8s.io/component-base/metrics/testutil"
    )
    
    func TestInstallHandler(t *testing.T) {
    	mux := http.NewServeMux()
    	InstallHandler(mux)
    	req, err := http.NewRequest("GET", "http://example.com/healthz", nil)
    	if err != nil {
    		t.Fatalf("unexpected error: %v", err)
    	}
    	w := httptest.NewRecorder()
    	mux.ServeHTTP(w, req)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 15 20:43:16 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  5. cmd/kube-scheduler/app/server.go

    	return handler
    }
    
    func installMetricHandler(pathRecorderMux *mux.PathRecorderMux, informers informers.SharedInformerFactory, isLeader func() bool) {
    	configz.InstallHandler(pathRecorderMux)
    	pathRecorderMux.Handle("/metrics", legacyregistry.HandlerWithReset())
    
    	resourceMetricsHandler := resources.Handler(informers.Core().V1().Pods().Lister())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 19:11:24 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  6. pkg/kubelet/server/server.go

    }
    
    // InstallDefaultHandlers registers the default set of supported HTTP request
    // patterns with the restful Container.
    func (s *Server) InstallDefaultHandlers() {
    	s.addMetricsBucketMatcher("healthz")
    	healthz.InstallHandler(s.restfulCont,
    		healthz.PingHealthz,
    		healthz.LogHealthz,
    		healthz.NamedCheck("syncloop", s.syncLoopHealthCheck),
    	)
    
    	slis.SLIMetricsWithReset{}.Install(s.restfulCont)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 40.1K bytes
    - Viewed (0)
  7. cmd/kube-proxy/app/server.go

    func serveMetrics(bindAddress string, proxyMode kubeproxyconfig.ProxyMode, enableProfiling bool, errCh chan error) {
    	if len(bindAddress) == 0 {
    		return
    	}
    
    	proxyMux := mux.NewPathRecorderMux("kube-proxy")
    	healthz.InstallHandler(proxyMux)
    	slis.SLIMetricsWithReset{}.Install(proxyMux)
    
    	proxyMux.HandleFunc("/proxyMode", func(w http.ResponseWriter, r *http.Request) {
    		w.Header().Set("Content-Type", "text/plain; charset=utf-8")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 13:27:41 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  8. cmd/kubelet/app/server.go

    	}
    
    	if err := RunKubelet(ctx, s, kubeDeps, s.RunOnce); err != nil {
    		return err
    	}
    
    	if s.HealthzPort > 0 {
    		mux := http.NewServeMux()
    		healthz.InstallHandler(mux)
    		go wait.Until(func() {
    			err := http.ListenAndServe(net.JoinHostPort(s.HealthzBindAddress, strconv.Itoa(int(s.HealthzPort))), mux)
    			if err != nil {
    				klog.ErrorS(err, "Failed to start healthz server")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:34 UTC 2024
    - 53.9K bytes
    - Viewed (0)
Back to top