-
Notifications
You must be signed in to change notification settings - Fork 594
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
core: polishing and docs for ServerBuilder API #3382
Conversation
This should signify that the binding is not yet done when the method is called but only later when the source is materialized.
…nto server-builder-docs
Test PASSed. |
*/ | ||
def bind(): Source[IncomingConnection, CompletionStage[ServerBinding]] | ||
def connectionSource(): Source[IncomingConnection, CompletionStage[ServerBinding]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also call it Tcp.bind()
in Akka, but I agree something like this is better.
Just connections
or source
/asSource
would work for me as well, this is 👍 too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just
connections
orsource
/asSource
would work for me as well, this is +1 too.
All good suggestions, but lets keep connectionSource
as I like the extra verbosity for that particular method.
Http().newServerAt("127.0.0.1", 443).enableHttps(https).bindFlow(commonRoutes) | ||
Http().newServerAt("127.0.0.1", 80).bindFlow(commonRoutes) | ||
Http().newServerAt("127.0.0.1", 443).enableHttps(https).bind(commonRoutes) | ||
Http().newServerAt("127.0.0.1", 80).bind(commonRoutes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 weird that we had bindFlow
here before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that might have been missed by scalafix for some reason.
Co-authored-by: Arnout Engelen <github@bzzt.net>
Test PASSed. |
bind()
toconnectionSource
to make it clear that calling the method will not immediately create a binding and also to avoid overloadingbind()
(which became awkward in docs)Http().bindXYZ
usages