Documentation ¶
Index ¶
- Constants
- func ListenAndServe(addr string, handler http.Handler) error
- func ListenAndServeTLS(addr string, certFile string, keyFile string, handler http.Handler) error
- type Server
- func (srv *Server) GetCertificateWithOcsp(*tls.ClientHelloInfo) (*tls.Certificate, error)
- func (srv *Server) ListenAndServe() error
- func (srv *Server) ListenAndServeTLS(certFile, keyFile string) error
- func (srv *Server) ListenAndServeTLSOcsp(expire time.Duration, certFile, keyFile string) error
- func (srv *Server) Serve() error
Constants ¶
View Source
const ( DEFAULT_READ_TIMEOUT = 60 * time.Second DEFAULT_WRITE_TIMEOUT = DEFAULT_READ_TIMEOUT )
View Source
const ( GRACEFUL_ENVIRON_KEY = "IS_GRACEFUL" GRACEFUL_ENVIRON_STRING = GRACEFUL_ENVIRON_KEY + "=1" GRACEFUL_LISTENER_FD = 3 OCSP_DEFAULT_EXPIRE = time.Minute * 10 )
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
refer http.ListenAndServe
Types ¶
type Server ¶
HTTP server that supported graceful shutdown or restart
func (*Server) GetCertificateWithOcsp ¶ added in v1.4.0
func (srv *Server) GetCertificateWithOcsp(*tls.ClientHelloInfo) (*tls.Certificate, error)
func (*Server) ListenAndServe ¶
func (*Server) ListenAndServeTLS ¶
func (*Server) ListenAndServeTLSOcsp ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.