Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature: Public ShutdownWithContext #2407

Merged
merged 4 commits into from
Apr 9, 2023

Conversation

jcyamacho
Copy link
Contributor

@jcyamacho jcyamacho commented Apr 7, 2023

Description

The Fiber app offers two shutdown options: Shutdown and ShutdownWithTimeout. Both of these options internally use a private shutdownWithContext method, which is more versatile for those using Fiber. By making shutdownWithContext public, we allow developers to create the best strategy for shutting down the app.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • For new functionalities I follow the inspiration of the express js framework and built them similar in usage
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation - /docs/ directory for https://docs.gofiber.io/
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • If new dependencies exist, I have checked that they are really necessary and agreed with the maintainers/community (we want to have as few dependencies as possible)
  • I tried to make my code as fast as possible with as few allocations as possible
  • For new code I have written benchmarks so that they can be analyzed and improved

Commit formatting:

Use emojis on commit messages so it provides an easy way of identifying the purpose or intention of a commit. Check out the emoji cheatsheet here: https://gitmoji.carloscuesta.me/

@welcome
Copy link

welcome bot commented Apr 7, 2023

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@jcyamacho jcyamacho changed the title feat: public shutdown with context 🚀 Feature: public shutdown with context Apr 7, 2023
@jcyamacho jcyamacho changed the title 🚀 Feature: public shutdown with context 🚀 Feature: Public ShutdownWithContext Apr 7, 2023
@jcyamacho jcyamacho marked this pull request as ready for review April 7, 2023 13:05
Copy link
Member

@gaby gaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now sure why the spacing was changed in the .md files

docs/api/app.md Outdated Show resolved Hide resolved
app.go Show resolved Hide resolved
@jcyamacho
Copy link
Contributor Author

Now sure why the spacing was changed in the .md files

it was an auto-formatter in my local.. 😅

Copy link
Member

@gaby gaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@li-jin-gou li-jin-gou merged commit 562d15d into gofiber:master Apr 9, 2023
@welcome
Copy link

welcome bot commented Apr 9, 2023

Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@jcyamacho jcyamacho deleted the feat/shutdown-with-context branch April 9, 2023 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants