- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 48 for HandleFunc (0.43 sec)
-
pilot/cmd/pilot-agent/status/testserver/server.go
} func createHTTPServer(handlers map[string]func(rw http.ResponseWriter, _ *http.Request)) *httptest.Server { mux := http.NewServeMux() for k, v := range handlers { mux.HandleFunc(k, http.HandlerFunc(v)) } // Start a local HTTP server server := httptest.NewUnstartedServer(mux) l, err := net.Listen("tcp", ":0") if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jan 26 17:53:14 UTC 2022 - 1.7K bytes - Viewed (0) -
pilot/cmd/pilot-agent/status/server.go
if s.enableProfiling { // Add the handler for pprof. mux.HandleFunc("/debug/pprof/", s.handlePprofIndex) mux.HandleFunc("/debug/pprof/cmdline", s.handlePprofCmdline) mux.HandleFunc("/debug/pprof/profile", s.handlePprofProfile) mux.HandleFunc("/debug/pprof/symbol", s.handlePprofSymbol) mux.HandleFunc("/debug/pprof/trace", s.handlePprofTrace) } mux.HandleFunc("/debug/ndsz", s.handleNdsz)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 23 15:07:03 UTC 2024 - 31.1K bytes - Viewed (0) -
src/runtime/race/testdata/io_test.go
time.Sleep(1e6) continue } break } _ = x } var ( regHandler sync.Once handlerData int ) func TestNoRaceIOHttp(t *testing.T) { regHandler.Do(func() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { handlerData++ fmt.Fprintf(w, "test") handlerData++ }) }) ln, err := net.Listen("tcp", "127.0.0.1:0") if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 08 07:33:58 UTC 2021 - 1.3K bytes - Viewed (0) -
src/net/http/doc.go
# Servers ListenAndServe starts an HTTP server with a given address and handler. The handler is usually nil, which means to use [DefaultServeMux]. [Handle] and [HandleFunc] add handlers to [DefaultServeMux]: http.Handle("/foo", fooHandler) http.HandleFunc("/bar", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path)) }) log.Fatal(http.ListenAndServe(":8080", nil))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 3.4K bytes - Viewed (0) -
istioctl/pkg/admin/istiodconfig_test.go
case http.MethodGet: _, _ = writer.Write([]byte(getResponse)) } } func setupHTTPServer() (*httptest.Server, *url.URL) { handler := http.NewServeMux() handler.HandleFunc("/scopej/ads", adsHandler) handler.HandleFunc("/scopej/resource", resourceHandler) server := httptest.NewServer(handler) url, _ := url.Parse(server.URL) return server, url } func Test_flagState_run(t *testing.T) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 15 15:02:17 UTC 2023 - 6.2K bytes - Viewed (0) -
docs/auditlog/auditlog-echo.go
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) -
docs/iam/identity-manager-plugin.go
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) -
src/net/http/pprof/pprof.go
func init() { prefix := "" if godebug.New("httpmuxgo121").Value() != "1" { prefix = "GET " } http.HandleFunc(prefix+"/debug/pprof/", Index) http.HandleFunc(prefix+"/debug/pprof/cmdline", Cmdline) http.HandleFunc(prefix+"/debug/pprof/profile", Profile) http.HandleFunc(prefix+"/debug/pprof/symbol", Symbol) http.HandleFunc(prefix+"/debug/pprof/trace", Trace) } // Cmdline responds with the running program's
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 27 17:34:05 UTC 2024 - 14.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/decompose_optionals.cc
succeeded(adjustBranch(ifop, ifop.then_function(), rewriter)) || succeeded(adjustBranch(ifop, ifop.else_function(), rewriter)); return LogicalResult::success(success); } }; class HandleFunc : public OpRewritePattern<func::FuncOp> { public: using OpRewritePattern::OpRewritePattern; LogicalResult matchAndRewrite(func::FuncOp f,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jun 12 21:18:05 UTC 2024 - 9.8K bytes - Viewed (0) -
docs/sts/web-identity.go
TokenURL: ddoc.TokenEndpoint, }, RedirectURL: fmt.Sprintf("http://10.0.0.67:%d/oauth2/callback", port), Scopes: scopes, } state := randomState() http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { log.Printf("%s %s", r.Method, r.RequestURI) if r.RequestURI != "/" { http.NotFound(w, r) return } if clientSec != "" {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 19 09:13:33 UTC 2023 - 7.8K bytes - Viewed (0)