Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListenAddress ¶
type ListenAddress struct {
Raw string
Host string
Port int
HostExplicit bool
HostWildcard bool
HostLoopback bool
}
ListenAddress describes a parsed host:port listener with bind classification.
func ParseListenAddress ¶
func ParseListenAddress(addr string) (ListenAddress, error)
ParseListenAddress parses a port-only, :port, or host:port listener string.
func PreferredAdvertisedListenAddress ¶
func PreferredAdvertisedListenAddress(primaryAddr, legacyAddr string) (ListenAddress, error)
PreferredAdvertisedListenAddress returns the listener surfaced on public discovery endpoints, preferring the legacy listener when configured.
func (ListenAddress) ExplicitAdvertisedHost ¶
func (a ListenAddress) ExplicitAdvertisedHost() string
ExplicitAdvertisedHost returns the configured explicit host when the listener is not wildcard-bound.
func (ListenAddress) ExposesNonLoopback ¶
func (a ListenAddress) ExposesNonLoopback() bool
ExposesNonLoopback reports whether the listener is reachable beyond loopback.
Click to show internal directories.
Click to hide internal directories.