Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option struct { Host string Port int Logger baselogger.Logger Middlewares []gin.HandlerFunc }
Config HTTP config
func AddMiddleware ¶
func AddMiddleware(l gin.HandlerFunc) *Option
func SetLogger ¶
func SetLogger(l baselogger.Logger) *Option
func (*Option) AddMiddleware ¶
func (c *Option) AddMiddleware(l gin.HandlerFunc) *Option
func (*Option) MergeOption ¶
type Server ¶
type Server struct { *gin.Engine Logger baselogger.Logger Server *http.Server // contains filtered or unexported fields }
Server ...
func (*Server) GracefulStop ¶
GracefulStop implements server.Server interface it will stop gin server gracefully
func (*Server) Info ¶
func (s *Server) Info() *server.ServiceInfo
Click to show internal directories.
Click to hide internal directories.