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

feat: New, Start, Shutdown #38

Merged
merged 2 commits into from
Mar 1, 2024
Merged

feat: New, Start, Shutdown #38

merged 2 commits into from
Mar 1, 2024

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Mar 1, 2024

alternative for #36

@caarlos0 caarlos0 mentioned this pull request Mar 1, 2024
@dezren39
Copy link
Contributor

dezren39 commented Mar 1, 2024

#36 (comment)

works for me! i would like to expose the server to the middleware i think that would be convenient.

#39

@dezren39
Copy link
Contributor

dezren39 commented Mar 1, 2024

actually, is there a way we can make it so that signal.Notify can be skipped? I don't need to pass in my own signals or anything. A switch that is false in the server making an if around the signal.Notify would work. I could set IgnoreSignals: true and then <- done would wait forever

edit: I forgot the server is created with a function not a plain struct, so idk, a new parameter or fn opt?

@caarlos0
Copy link
Member Author

caarlos0 commented Mar 1, 2024

you can create and shutdown the server without any of it with this already, just the default listen method that will do that for you... but you don't need to use it :D

@caarlos0
Copy link
Member Author

caarlos0 commented Mar 1, 2024

I pushed an example

@caarlos0 caarlos0 marked this pull request as ready for review March 1, 2024 17:59
@dezren39
Copy link
Contributor

dezren39 commented Mar 1, 2024

ok i didn't realize you could do that, yeah with this example i think that works for me. thanks!

@caarlos0 caarlos0 merged commit 83a66da into main Mar 1, 2024
20 checks passed
@caarlos0 caarlos0 deleted the server branch March 1, 2024 19:37
@caarlos0
Copy link
Member Author

caarlos0 commented Mar 1, 2024

awesome, thank you!

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.

2 participants