-
Notifications
You must be signed in to change notification settings - Fork 604
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
Add fs2.StreamApp from http4s #982
Conversation
@aeons cool and thanks for that. Just some general comments: I would consider to have StreamApp around the type Do you think it may be defined without the need of ExecutionContext at all? Instead of ExitCode algebra, do you think we can provide just Int to be consistent with System.exit ? I am not completely sure about the It would be excellent if we would be able do develop functionality that will interpret these signals, and provide something like Stream[F, SYS_SIGNAL] to be consulted within the |
The The ExecutionContext is needed, as I understand it, but I think @rossabaker has a better grasp on that part. WRT. ExitCode, I don't have any strong preferences. Since it's turned into a byte at the OS-level, having a type with constants for error and success made sense in http4s. The Most of the discussions on |
Looks good to me. I'm fine with keeping |
Sure, that's where it lived to begin with in http4s, but since it was referenced from the server builders, it was agreed to move it out. Since it will only be referred to from |
Oh, super minor thing but can we do TitleCase for the constants Success and Error? |
LGTM. I'll give @pchlupacek some time to review your response from earlier but otherwise I think this is ready for merge. |
ok no problem with merging this I perhaps would like to suggest some improvements on handling unix signal and shutdownhook later, but lets start with this. |
This is a first attempt at a
StreamApp
in fs2. I've taken the one in http4s, tried to conform to the code style in fs2 and named itfs2.StreamApp
. I've also addedfs2.ExitCode
. It could live in the same file asStreamApp
, to keep the entire machinery contained in one file.I have added the tests we had in http4s as well.
Closes #973