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

refactor: revise route_guide example #245

Merged
merged 1 commit into from
Jul 22, 2022

Conversation

wingyplus
Copy link
Contributor

  • Change supervisor declration in tree.
  • Cleanup dependencies.
  • Use jason instead of poison.
  • Auto start server.
  • Move route_guide.proto to priv/protos.

* Change supervisor declration in tree.
* Cleanup dependencies.
* Use jason instead of poison.
* Auto start server.
* Move route_guide.proto to priv/protos.
@@ -1,3 +1,3 @@
import Config

# config :grpc, start_server: true
config :grpc, start_server: true
Copy link
Contributor

Choose a reason for hiding this comment

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

This is something I wish to refactor. IMO We should move to a "add X to your supervision tree" instead of this global config

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You means like:

children = [
  {GRPC.Server.Supervisor, {Endpoint, 50000}, start_server: true}
]

Copy link
Contributor

Choose a reason for hiding this comment

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

Exactly! I've opened #246 for this

Copy link
Contributor

Choose a reason for hiding this comment

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

This would enable multiple servers to run from the same application in different ports

Copy link
Contributor Author

@wingyplus wingyplus Jul 22, 2022

Choose a reason for hiding this comment

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

Great! I will change the example to use the new way after resolve #246 . 🙇‍♂️

@polvalente polvalente merged commit 8db5727 into elixir-grpc:master Jul 22, 2022
@wingyplus wingyplus deleted the overhaul-example branch July 30, 2022 06:32
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