Skip to content

feat: Add lifecycle handlers - #360

Merged
spencewenski merged 1 commit into
mainfrom
gh-350-lifecycle-hooks
Aug 29, 2024
Merged

feat: Add lifecycle handlers#360
spencewenski merged 1 commit into
mainfrom
gh-350-lifecycle-hooks

Conversation

@spencewenski

Copy link
Copy Markdown
Member

Add AppLifecycleHandler trait with methods that are called at various stages of an app's lifecycle. The initial set of methods are the following:

  • before_service_cli
  • before_health_checks
  • before_services
  • on_shutdown

Closes #350

Add `AppLifecycleHandler` trait with methods that are called at various
stages of an app's lifecycle. The initial set of methods are the
following:

- `before_service_cli`
- `before_health_checks`
- `before_services`
- `on_shutdown`

Closes #350
@codecov

codecov Bot commented Aug 29, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 24.18301% with 116 lines in your changes missing coverage. Please review.

Project coverage is 46.00%. Comparing base (20f6827) to head (503610d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/app/mod.rs 0.00% 35 Missing ⚠️
src/lifecycle/registry.rs 0.00% 34 Missing ⚠️
src/lifecycle/default.rs 0.00% 19 Missing ⚠️
src/lifecycle/mod.rs 0.00% 19 Missing ⚠️
src/lifecycle/db_migration.rs 70.00% 9 Missing ⚠️
Files with missing lines Coverage Δ
src/config/app_config.rs 30.84% <100.00%> (+1.31%) ⬆️
src/config/health_check/mod.rs 100.00% <ø> (ø)
src/config/lifecycle/mod.rs 100.00% <100.00%> (ø)
src/health_check/default.rs 100.00% <100.00%> (ø)
src/health_check/mod.rs 10.00% <ø> (ø)
src/service/http/initializer/default.rs 100.00% <100.00%> (ø)
src/service/http/middleware/default.rs 100.00% <100.00%> (ø)
src/service/runner.rs 0.00% <ø> (ø)
src/lifecycle/db_migration.rs 70.00% <70.00%> (ø)
src/lifecycle/default.rs 0.00% <0.00%> (ø)
... and 3 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20f6827...503610d. Read the comment docs.

@spencewenski
spencewenski merged commit 8342a9e into main Aug 29, 2024
@spencewenski
spencewenski deleted the gh-350-lifecycle-hooks branch August 29, 2024 22:42
@github-actions github-actions Bot mentioned this pull request Aug 30, 2024
spencewenski pushed a commit that referenced this pull request Aug 30, 2024
## 🤖 New release
* `roadster`: 0.6.1 -> 0.6.2

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.6.2](roadster-v0.6.1...roadster-v0.6.2)
- 2024-08-30

### Added
- Allow specifying a custom config dir
([#361](#361))
- Add lifecycle handlers
([#360](#360))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Lifecycle hooks

1 participant