Documentation
¶
Index ¶
- type Server
- func (s *Server) Available() gin.HandlerFunc
- func (s *Server) Healthz(c *gin.Context)
- func (s *Server) Login(c *gin.Context)
- func (s *Server) Logout(c *gin.Context)
- func (s *Server) NotAllowed(c *gin.Context)
- func (s *Server) NotFound(c *gin.Context)
- func (s *Server) Readyz(c *gin.Context)
- func (s *Server) Reauthenticate(c *gin.Context)
- func (s *Server) Register(c *gin.Context)
- func (s *Server) Serve() (err error)
- func (s *Server) SetStatus(health, ready bool)
- func (s *Server) Shutdown() error
- func (s *Server) Status(c *gin.Context)
- func (s *Server) URL() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
func (*Server) Available ¶
func (s *Server) Available() gin.HandlerFunc
Available is middleware that uses the healthy boolean to return a service unavailable http status code if the server is shutting down. It does this before all routes to ensure that complex handling doesn't bog down the server.
func (*Server) NotAllowed ¶
func (*Server) Reauthenticate ¶
func (*Server) SetStatus ¶
SetHealth sets the health status on the API server, putting it into unavailable mode if health is false, and removing maintenance mode if health is true. Here primarily for testing purposes since it is unlikely an outside caller can access this.
func (*Server) Status ¶
Status is an unauthenticated endpoint that returns the status of the api server and can be used for heartbeats and liveness checks. This status method is the global status method, meaning it returns the latest version of the whipser service, no matter how many API versions are available.