Skip to content

Instantly share code, notes, and snippets.

View Nashluffy's full-sized avatar
🎯
Focusing

Nash Luffman Nashluffy

🎯
Focusing
View GitHub Profile
func (s *SidecarAPI) Shutdown(r *http.Request) (interface{}, []error, *api.ApiError, func()) {
err := s.client.Quit(r.Context(), s.promURL)
if err != nil {
return internalError(fmt.Errorf("failed to quit prometheus: %w", err))
}
db, err := tsdb.OpenDBReadOnly(s.dataDir, s.logger)
if err != nil {
return internalError(fmt.Errorf("failed to start read-only tsdb: %w", err))
}