(w http.ResponseWriter, r *http.Request)
| 65 | } |
| 66 | |
| 67 | func (s *Service) GetBackendStats(w http.ResponseWriter, r *http.Request) { |
| 68 | stats, err := s.Backend().GetSysStats(r.Context()) |
| 69 | if err != nil { |
| 70 | st, _ := status.FromError(err) |
| 71 | httpCode := common.GrpcCodeToHTTP(st.Code()) |
| 72 | http.Error(w, err.Error(), httpCode) |
| 73 | return |
| 74 | } |
| 75 | |
| 76 | common.SendProtoResponse(w, stats) |
| 77 | } |
| 78 | |
| 79 | func (s *Service) GetOutboundsLatency(w http.ResponseWriter, r *http.Request) { |
| 80 | var request common.LatencyRequest |
nothing calls this directly
no test coverage detected