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

Add supervisor_options option to specify top-level supervisor options #97

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

mtrudel
Copy link
Owner

@mtrudel mtrudel commented Nov 9, 2023

I can't believe this wasn't in the library already, but this adds support for specifying top-level options to the supervisor at top of a Thousand Island server instance. Specifically, this allows you to name a server for easier access (see the docs for more). An example:

iex(1)> ThousandIsland.start_link(handler_module: Echo, supervisor_options: [name: :my_special_name])
{:ok, #PID<0.254.0>}
iex(2)> ThousandIsland.listener_info(:my_special_name)
{:ok, {{0, 0, 0, 0}, 4000}}

@mtrudel mtrudel merged commit 3d4e314 into main Nov 11, 2023
9 checks passed
@mtrudel mtrudel deleted the named_servers branch November 11, 2023 21:38
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