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

listen_address should have an optional port and validate the host part #177

Open
anarcat opened this issue Aug 18, 2023 · 0 comments
Open

Comments

@anarcat
Copy link

anarcat commented Aug 18, 2023

Right now the listen_interface type enforces a port number, which is actually optional. it seems better to leave it out as it has a sane default too, registered in the prometheus port list and everything:

Optional[Pattern[/.*:.+/]] $listen_address = undef,

it seems to me this should be some sort of hybrid type, a concatenation of Stdlib::Host and Stdlib::Port, with the latter optional. I'm not sure how we can do this without creating a new type, so maybe that's what should be done here, but then again I can't help but feel this might actually live better straight in stdlib. Surely someone else has had this problem before, right?

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

No branches or pull requests

1 participant