nolint:unused
(ctx context.Context, db database.Store, logger slog.Logger)
| 322 | func _debugExpVar(http.ResponseWriter, *http.Request) {} //nolint:unused |
| 323 | |
| 324 | func loadDismissedHealthchecks(ctx context.Context, db database.Store, logger slog.Logger) []healthsdk.HealthSection { |
| 325 | dismissedHealthchecks := []healthsdk.HealthSection{} |
| 326 | settingsJSON, err := db.GetHealthSettings(ctx) |
| 327 | if err == nil { |
| 328 | var settings healthsdk.HealthSettings |
| 329 | err = json.Unmarshal([]byte(settingsJSON), &settings) |
| 330 | if len(settings.DismissedHealthchecks) > 0 { |
| 331 | dismissedHealthchecks = settings.DismissedHealthchecks |
| 332 | } |
| 333 | } |
| 334 | if err != nil && !xerrors.Is(err, sql.ErrNoRows) { |
| 335 | logger.Error(ctx, "unable to fetch health settings", slog.Error(err)) |
| 336 | } |
| 337 | return dismissedHealthchecks |
| 338 | } |
| 339 | |
| 340 | // ProfileCollector abstracts the mechanics of collecting pprof/trace |
| 341 | // data from the Go runtime. Production code uses defaultProfileCollector; |
no test coverage detected