Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for StatusOK (0.15 sec)

  1. cni/pkg/nodeagent/healthServer_test.go

    	makeReq(t, server.URL, constants.LivenessEndpoint, http.StatusOK)
    	makeReq(t, server.URL, constants.ReadinessEndpoint, http.StatusServiceUnavailable)
    
    	installReady.Store(true)
    	watchReady.Store(true)
    	assert.Equal(t, installReady.Load(), true)
    	assert.Equal(t, watchReady.Load(), true)
    
    	makeReq(t, server.URL, constants.LivenessEndpoint, http.StatusOK)
    	makeReq(t, server.URL, constants.ReadinessEndpoint, http.StatusOK)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. cmd/healthcheck-handler.go

    		if opts.Maintenance {
    			writeResponse(w, http.StatusPreconditionFailed, nil, mimeNone)
    		} else {
    			writeResponse(w, http.StatusServiceUnavailable, nil, mimeNone)
    		}
    		return
    	}
    	writeResponse(w, http.StatusOK, nil, mimeNone)
    }
    
    // ClusterReadCheckHandler returns if the server is ready for requests.
    func ClusterReadCheckHandler(w http.ResponseWriter, r *http.Request) {
    	ctx := newContext(r, w, "ClusterReadCheckHandler")
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/healthServer.go

    	w.WriteHeader(http.StatusOK)
    }
    
    func readyz(installReady, watchReady *atomic.Value) http.HandlerFunc {
    	return func(w http.ResponseWriter, _ *http.Request) {
    		if !installReady.Load().(bool) || !watchReady.Load().(bool) {
    			http.Error(w, http.StatusText(http.StatusServiceUnavailable), http.StatusServiceUnavailable)
    			return
    		}
    		w.WriteHeader(http.StatusOK)
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 15 01:29:35 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  4. cmd/generic-handlers_test.go

    		w.WriteHeader(http.StatusOK)
    	}
    	for i, test := range sseTLSHandlerTests {
    		globalIsTLS = test.IsTLS
    
    		w := httptest.NewRecorder()
    		r := new(http.Request)
    		r.Header = test.Header
    		r.URL = test.URL
    
    		h := setRequestValidityMiddleware(okHandler)
    		h.ServeHTTP(w, r)
    
    		switch {
    		case test.ShouldFail && w.Code == http.StatusOK:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Mar 28 17:44:56 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/proxy/streamtranslator.go

    			websocketStreams.writeStatus(codeExitToStatusError(exitErr))
    			// Returned an exit code from the container, so not an error in
    			// stream translator--add StatusOK to metrics.
    			metrics.IncStreamTranslatorRequest(req.Context(), strconv.Itoa(http.StatusOK))
    		} else {
    			websocketStreams.writeStatus(apierrors.NewInternalError(err))
    			metrics.IncStreamTranslatorRequest(req.Context(), strconv.Itoa(http.StatusInternalServerError))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 27 23:21:55 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  6. tests/integration/pilot/multiplecontrolplanes/main_test.go

    				{
    					name:       "workloads within same usergroup can communicate, same namespace",
    					statusCode: http.StatusOK,
    					from:       apps.NS[0].A,
    					to:         apps.NS[0].B,
    				},
    				{
    					name:       "workloads within same usergroup can communicate, different namespaces",
    					statusCode: http.StatusOK,
    					from:       apps.NS[1].A,
    					to:         apps.NS[2].B,
    				},
    				{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 16:52:52 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  7. cni/pkg/plugin/cnieventclient_test.go

    	// Fake out a test HTTP server and use that instead of a real HTTP server over gRPC to validate  req/resp flows
    	testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
    		res.WriteHeader(http.StatusOK)
    		res.Write([]byte("server happy"))
    	}))
    	defer func() { testServer.Close() }()
    
    	cniC := fakeCNIEventClient(testServer.URL)
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 26 20:34:28 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  8. src/database/sql/example_service_test.go

    		defer cancel()
    
    		err := s.db.PingContext(ctx)
    		if err != nil {
    			http.Error(w, fmt.Sprintf("db down: %v", err), http.StatusFailedDependency)
    			return
    		}
    		w.WriteHeader(http.StatusOK)
    		return
    	case "/quick-action":
    		// This is a short SELECT. Use the request context as the base of
    		// the context timeout.
    		ctx, cancel := context.WithTimeout(r.Context(), 3*time.Second)
    		defer cancel()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 20:21:26 UTC 2024
    - 4K bytes
    - Viewed (0)
  9. docs/auditlog/auditlog-echo.go

    		return
    	}
    
    	log.Printf(">>> %s %s\n", r.Method, r.URL.Path)
    	var out bytes.Buffer
    	json.Indent(&out, body, "", "    ")
    	log.Printf("%s\n", out.String())
    
    	w.WriteHeader(http.StatusOK)
    }
    
    func main() {
    	flag.Parse()
    	http.HandleFunc("/", mainHandler)
    
    	log.Printf("Listening on :%d\n", port)
    	log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 21:31:13 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  10. docs/iam/identity-manager-plugin.go

    		return
    	}
    
    	rsp, ok := tokens[token]
    	if !ok {
    		w.WriteHeader(http.StatusForbidden)
    		return
    	}
    
    	fmt.Printf("Allowed for token: %s user: %s\n", token, rsp.User)
    
    	w.WriteHeader(http.StatusOK)
    	json.NewEncoder(w).Encode(rsp)
    	return
    }
    
    func main() {
    	http.HandleFunc("/", mainHandler)
    
    	log.Print("Listening on :8081")
    	log.Fatal(http.ListenAndServe(":8081", nil))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 21:31:13 UTC 2024
    - 2.1K bytes
    - Viewed (0)
Back to top