Documentation ¶
Index ¶
- type Server
- func (s *Server) RegisterRouter(method, relativePath string, handler context.HandlerFunc)
- func (s *Server) Router() *router.Router
- func (s *Server) Run(addr ...string) error
- func (s *Server) RunTLS(certFile, keyFile string, addr ...string) error
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) Shutdown(ctx syscontext.Context) error
- func (s *Server) Tmpl() *tmpl.Tmpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server httpServer类
func (*Server) RegisterRouter ¶
func (s *Server) RegisterRouter(method, relativePath string, handler context.HandlerFunc)
RegisterRouter 注册路由
Click to show internal directories.
Click to hide internal directories.