Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for ListenAndServeTLS (0.35 sec)

  1. docs/iam/access-manager-plugin.go

    	}
    
    	if certFile != "" || keyFile != "" {
    		if certFile == "" || keyFile == "" {
    			log.Fatal("Please provide both a key file and a cert file to enable TLS.")
    		}
    		serveFunc = func() error {
    			return http.ListenAndServeTLS(":8080", certFile, keyFile, nil)
    		}
    	}
    
    	http.HandleFunc("/", mainHandler)
    
    	log.Print("Listening on :8080")
    	log.Fatal(serveFunc())
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 08 17:15:20 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. src/net/http/example_test.go

    		io.WriteString(w, "Hello, TLS!\n")
    	})
    
    	// One can use generate_cert.go in crypto/tls to generate cert.pem and key.pem.
    	log.Printf("About to listen on 8443. Go to https://127.0.0.1:8443/")
    	err := http.ListenAndServeTLS(":8443", "cert.pem", "key.pem", nil)
    	log.Fatal(err)
    }
    
    func ExampleListenAndServe() {
    	// Hello world, the web server
    
    	helloHandler := func(w http.ResponseWriter, req *http.Request) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 19 16:12:45 UTC 2021
    - 5.4K bytes
    - Viewed (0)
  3. src/crypto/tls/example_test.go

    		log.Fatal(err)
    	}
    	cfg := &tls.Config{Certificates: []tls.Certificate{cert}}
    	srv := &http.Server{
    		TLSConfig:    cfg,
    		ReadTimeout:  time.Minute,
    		WriteTimeout: time.Minute,
    	}
    	log.Fatal(srv.ListenAndServeTLS("", ""))
    }
    
    func ExampleConfig_verifyConnection() {
    	// VerifyConnection can be used to replace and customize connection
    	// verification. This example shows a VerifyConnection implementation that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/server/secure_serving.go

    		}
    	}()
    
    	return serverShutdownCh, listenerStoppedCh, nil
    }
    
    // tcpKeepAliveListener sets TCP keep-alive timeouts on accepted
    // connections. It's used by ListenAndServe and ListenAndServeTLS so
    // dead TCP connections (e.g. closing laptop mid-download) eventually
    // go away.
    //
    // Copied from Go 1.7.2 net/http/server.go
    type tcpKeepAliveListener struct {
    	net.Listener
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 12 20:54:07 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  5. src/net/http/server.go

    // of the server's certificate, any intermediates, and the CA's certificate.
    func ListenAndServeTLS(addr, certFile, keyFile string, handler Handler) error {
    	server := &Server{Addr: addr, Handler: handler}
    	return server.ListenAndServeTLS(certFile, keyFile)
    }
    
    // ListenAndServeTLS listens on the TCP network address srv.Addr and
    // then calls [ServeTLS] to handle requests on incoming TLS connections.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  6. pkg/kubelet/server/server.go

    		s.TLSConfig = tlsOptions.Config
    		// Passing empty strings as the cert and key files means no
    		// cert/keys are specified and GetCertificate in the TLSConfig
    		// should be called instead.
    		if err := s.ListenAndServeTLS(tlsOptions.CertFile, tlsOptions.KeyFile); err != nil {
    			klog.ErrorS(err, "Failed to listen and serve")
    			os.Exit(1)
    		}
    	} else if err := s.ListenAndServe(); err != nil {
    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. src/net/http/serve_test.go

    			lnc <- ln
    		})
    		s = &Server{
    			Addr:      addr,
    			TLSConfig: tlsConf,
    		}
    		errc := make(chan error, 1)
    		go func() { errc <- s.ListenAndServeTLS("", "") }()
    		select {
    		case err := <-errc:
    			t.Logf("On try #%v: %v", try+1, err)
    			continue
    		case ln = <-lnc:
    			ok = true
    			t.Logf("Listening on %v", ln.Addr().String())
    			break Try
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*ServeMux).HandleFunc", Method, 0},
    		{"(*ServeMux).Handler", Method, 1},
    		{"(*ServeMux).ServeHTTP", Method, 0},
    		{"(*Server).Close", Method, 8},
    		{"(*Server).ListenAndServe", Method, 0},
    		{"(*Server).ListenAndServeTLS", Method, 0},
    		{"(*Server).RegisterOnShutdown", Method, 9},
    		{"(*Server).Serve", Method, 0},
    		{"(*Server).ServeTLS", Method, 9},
    		{"(*Server).SetKeepAlivesEnabled", Method, 3},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  9. api/go1.txt

    pkg net/http, func HandleFunc(string, func(ResponseWriter, *Request))
    pkg net/http, func Head(string) (*Response, error)
    pkg net/http, func ListenAndServe(string, Handler) error
    pkg net/http, func ListenAndServeTLS(string, string, string, Handler) error
    pkg net/http, func MaxBytesReader(ResponseWriter, io.ReadCloser, int64) io.ReadCloser
    pkg net/http, func NewFileTransport(FileSystem) RoundTripper
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top