(w http.ResponseWriter, r *http.Request)
| 77 | } |
| 78 | |
| 79 | func (s *Service) GetOutboundsLatency(w http.ResponseWriter, r *http.Request) { |
| 80 | var request common.LatencyRequest |
| 81 | if err := common.ReadProtoBody(r.Body, &request); err != nil { |
| 82 | http.Error(w, err.Error(), http.StatusBadRequest) |
| 83 | return |
| 84 | } |
| 85 | |
| 86 | latency, err := s.OutboundsLatency(r.Context(), &request) |
| 87 | if err != nil { |
| 88 | http.Error(w, err.Error(), http.StatusBadGateway) |
| 89 | return |
| 90 | } |
| 91 | |
| 92 | common.SendProtoResponse(w, latency) |
| 93 | } |
| 94 | |
| 95 | func (s *Service) GetSystemStats(w http.ResponseWriter, r *http.Request) { |
| 96 | common.SendProtoResponse(w, s.SystemStats(r.Context())) |
nothing calls this directly
no test coverage detected