Documentation
¶
Index ¶
- func IP2Addr(ip net.IP) (netip.Addr, bool)
- func ListenConfigWithOSTCPKeepAlive() *net.ListenConfig
- func ListenWithOSTCPKeepAlive(network, address string) (net.Listener, error)
- func TLSListenWithOSTCPKeepAlive(network, laddr string, config *tls.Config) (net.Listener, error)
- type ConnectionSet
- type ListenerMetrics
- type MultiURL
- func MultiURLFromURL(u *url.URL, tlsHost string) (MultiURL, error)
- func NewMultiURLForAddresses(scheme, tlsHost string, port uint16, addresses []netip.Addr) MultiURL
- func NewMultiURLForHost(scheme, host, tlsHost string, port uint16) MultiURL
- func ParseMultiURL(addr string) (MultiURL, error)
- func ParseURL(addr, tlsHost string) (MultiURL, error)
- type NewConnectionSet
- type OnceCloseListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenConfigWithOSTCPKeepAlive ¶
func ListenConfigWithOSTCPKeepAlive() *net.ListenConfig
ListenConfigWithOSTCPKeepAlive return a net.ListeConfig with OS-level KeepAlive settings.
Types ¶
type ConnectionSet ¶
type ListenerMetrics ¶
type ListenerMetrics struct { Log *slog.Logger NewSet NewConnectionSet GCPeriod time.Duration ErrRep errz.ErrReporter // contains filtered or unexported fields }
func (*ListenerMetrics) RunGC ¶
func (m *ListenerMetrics) RunGC(ctx context.Context)
type MultiURL ¶
type MultiURL struct {
// contains filtered or unexported fields
}
MultiURL is an immutable URL that has scheme, port, and one or more IP addresses or a host. TLS host can also be supplied.
func MultiURLFromURL ¶
MultiURLFromURL turns a URL into a MultiURL. The provided URL must: - not be opaque. - have a scheme. - host must be an IP address or a domain. - have a port. - hostname for TLS can be specified.
func NewMultiURLForAddresses ¶
func NewMultiURLForHost ¶
func ParseMultiURL ¶
ParseMultiURL parses addr according to the following opaque URL schema: scheme:ip[,ip]|port
type NewConnectionSet ¶
type NewConnectionSet func(name string, ttl time.Duration) (ConnectionSet, error)
type OnceCloseListener ¶
OnceCloseListener wraps a net.Listener, protecting it from multiple Close calls.
func (*OnceCloseListener) Close ¶
func (oc *OnceCloseListener) Close() error
Click to show internal directories.
Click to hide internal directories.