Documentation
¶
Index ¶
- type ErrorResponse
- type JobResponse
- type Server
- func (s *Server) HandleBlock(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleGetJobStatus(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleHealth(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleStartContainers(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleStopContainers(w http.ResponseWriter, r *http.Request)
- func (s *Server) HandleUnblock(w http.ResponseWriter, r *http.Request)
- func (s *Server) LoggingMiddleware(next http.Handler) http.Handler
- func (s *Server) RecoveryMiddleware(next http.Handler) http.Handler
- func (s *Server) Router() http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse represents an error response
type JobResponse ¶
type JobResponse struct {
JobID string `json:"job_id"`
}
JobResponse represents a job response
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the API server
func (*Server) HandleBlock ¶ added in v1.0.2
func (s *Server) HandleBlock(w http.ResponseWriter, r *http.Request)
HandleBlock handles POST /block/{duration}
func (*Server) HandleGetJobStatus ¶ added in v1.0.3
func (s *Server) HandleGetJobStatus(w http.ResponseWriter, r *http.Request)
HandleGetJobStatus handles GET /job_status/{job_id}
func (*Server) HandleHealth ¶
func (s *Server) HandleHealth(w http.ResponseWriter, r *http.Request)
HandleHealth handles GET /ping
func (*Server) HandleStartContainers ¶
func (s *Server) HandleStartContainers(w http.ResponseWriter, r *http.Request)
HandleStartContainers handles POST /start
func (*Server) HandleStopContainers ¶
func (s *Server) HandleStopContainers(w http.ResponseWriter, r *http.Request)
HandleStopContainers handles POST /stop
func (*Server) HandleUnblock ¶ added in v1.0.2
func (s *Server) HandleUnblock(w http.ResponseWriter, r *http.Request)
HandleUnblock handles POST /unblock
func (*Server) LoggingMiddleware ¶
LoggingMiddleware logs HTTP requests with structured logging
func (*Server) RecoveryMiddleware ¶
RecoveryMiddleware recovers from panics and logs them
Click to show internal directories.
Click to hide internal directories.