Documentation
¶
Index ¶
- type Server
- func (s *Server) Available() gin.HandlerFunc
- func (s *Server) IsHealthy() bool
- func (s *Server) NotAllowed(c *gin.Context)
- func (s *Server) NotFound(c *gin.Context)
- func (s *Server) Routes(router *gin.Engine) (err error)
- func (s *Server) Serve() (err error)
- func (s *Server) Shutdown(ctx context.Context) (err error)
- func (s *Server) Status(c *gin.Context)
- func (s *Server) URL() string
- func (s *Server) Uptime() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Implements the link shortening service and API.
func (*Server) Available ¶
func (s *Server) Available() gin.HandlerFunc
Available is middleware that uses healthy boolean to return a service unavailable http status code if the server is shutting down or in maintenance mode. This middleware must be fairly early on in the chain to ensure that complex handling does not slow the shutdown of the server.
func (*Server) NotAllowed ¶
Click to show internal directories.
Click to hide internal directories.