Skip to content

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

Description

@anarcat

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions