Documentation ¶
Index ¶
- type IHttpServer
- type Option
- type Server
- func (ss *Server) Construct(opt *option.Option[*Option], logger *logging.Logger[Server])
- func (ss *Server) GetPort() int
- func (ss *Server) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
- func (ss *Server) HandleFuncMethod(pattern string, method string, ...)
- func (ss *Server) OnReady(callback func())
- func (ss *Server) Start(ctx context.Context, wg *sync.TimeoutWaitGroup)
- func (ss *Server) Stop(ctx context.Context, wg *sync.TimeoutWaitGroup)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IHttpServer ¶
type Option ¶
type Option struct { Host string `snow:"Host"` MinPort int `snow:"MinPort"` MaxPort int `snow:"MaxPort"` KeepAliveSeconds int `snow:"KeepAliveSeconds"` TimeoutSeconds int `snow:"TimeoutSeconds"` WhiteList []string `snow:"WhiteList"` UncheckedPath []string `snow:"UncheckedPath"` Debug bool `snow:"Debug"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) HandleFunc ¶
func (*Server) HandleFuncMethod ¶
Click to show internal directories.
Click to hide internal directories.