Skip to content

feat(api): add health route in axum api - #427

Merged
Akinator31 merged 1 commit into
mainfrom
423-healthcheck-in-axum-api
Jun 16, 2026
Merged

feat(api): add health route in axum api#427
Akinator31 merged 1 commit into
mainfrom
423-healthcheck-in-axum-api

Conversation

@Akinator31

Copy link
Copy Markdown
Member

This pull request introduces a new /api/health endpoint to the API, allowing external systems to check the health status of the bot and its database connection. The handler performs checks on the database, bot running state, connectivity, and latency, returning a detailed JSON status. The new handler is integrated into the API router and made available for use throughout the codebase.

New Health Endpoint:

  • Added handle_health function in crates/rustmail/src/api/handler/health.rs to check database connectivity, bot running state, connection status, and latency, and return a structured JSON health report.
  • Registered the new /api/health route in the API router (crates/rustmail/src/api/router.rs) to expose the health check endpoint.

Module Integration:

  • Added health module to the handler modules (crates/rustmail/src/api/handler/mod.rs).
  • Re-exported the health handler for use in other parts of the application (crates/rustmail/src/api/handler/mod.rs).

@Akinator31 Akinator31 self-assigned this Jun 16, 2026
@Akinator31 Akinator31 linked an issue Jun 16, 2026 that may be closed by this pull request
@Akinator31
Akinator31 merged commit bb6c5cf into main Jun 16, 2026
2 checks passed
@Akinator31
Akinator31 deleted the 423-healthcheck-in-axum-api branch June 16, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Healthcheck in axum api

1 participant