Documentation ¶
Index ¶
- Constants
- Variables
- func EndlessFushin(srv *fushinHttp.Server) error
- func EndlessHooks(addr string, hd http.Handler, beforeHooks func(add string)) error
- func EndlessRun(address string, hd http.Handler) error
- func ListenAndServe(addr string, handler http.Handler) error
- func ListenAndServeTLS(addr string, certFile string, keyFile string, handler http.Handler) error
- func NewServer(addr string, handler http.Handler) (srv *endlessServer)
- type EndlessConfig
- type EndlessServer
Constants ¶
const ( PRE_SIGNAL = iota POST_SIGNAL STATE_INIT STATE_RUNNING STATE_SHUTTING_DOWN STATE_TERMINATE )
Variables ¶
Functions ¶
func EndlessFushin ¶
func EndlessFushin(srv *fushinHttp.Server) error
EndlessFushin 直接对endless的快速调用 以fushinServer初始化
func EndlessHooks ¶
EndlessHooks 直接对endless的快速调用 增加必备hooks
func ListenAndServe ¶
ListenAndServe listens on the TCP network address addr and then calls Serve with handler to handle requests on incoming connections. Handler is typically nil, in which case the DefaultServeMux is used.
func ListenAndServeTLS ¶
ListenAndServeTLS acts identically to ListenAndServe, except that it expects HTTPS connections. Additionally, files containing a certificate and matching private key for the server must be provided. If the certificate is signed by a certificate authority, the certFile should be the concatenation of the server's certificate followed by the CA's certificate.
Types ¶
type EndlessConfig ¶
type EndlessServer ¶
type EndlessServer struct {
// contains filtered or unexported fields
}
func (*EndlessServer) RegHooksShutdown ¶
func (e *EndlessServer) RegHooksShutdown(f func())
RegHooksShutdown Register hooks on Shutdown for endlessServer
func (*EndlessServer) ShutdownCtx ¶
func (e *EndlessServer) ShutdownCtx(ctx context.Context) error
ShutdownCtx for endlessServer