()
| 140 | } |
| 141 | |
| 142 | func (s *Server) Routes() http.Handler { |
| 143 | mux := http.NewServeMux() |
| 144 | mux.HandleFunc("/health", s.health) |
| 145 | mux.HandleFunc("/status", s.status) |
| 146 | mux.HandleFunc("/metrics", s.metrics) |
| 147 | mux.HandleFunc("/infer", s.infer) |
| 148 | return s.withOptionalInfercoreAuth(s.withRequestLoggingAndMetrics(mux)) |
| 149 | } |
| 150 | |
| 151 | // Shutdown releases telemetry resources (e.g. OTLP batch flush). Call on process exit. |
| 152 | func (s *Server) Shutdown(ctx context.Context) error { |