Documentation ¶
Index ¶
Constants ¶
View Source
const ( Started = iota Running Shutdown )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerWrapper ¶
type ServerWrapper struct { State uint8 // 服务启动状态 Server *http.Server // contains filtered or unexported fields }
封装
func NewServerWrapper ¶
func NewServerWrapper(server *http.Server) *ServerWrapper
func (*ServerWrapper) ListenAndServe ¶
func (s *ServerWrapper) ListenAndServe()
func (*ServerWrapper) ListenAndServes ¶
func (s *ServerWrapper) ListenAndServes(certFile, keyFile string)
func (*ServerWrapper) Prepare ¶
func (s *ServerWrapper) Prepare()
func (*ServerWrapper) Shutdown ¶
func (s *ServerWrapper) Shutdown()
Click to show internal directories.
Click to hide internal directories.