Documentation ¶
Index ¶
- func IP2Addr(ip net.IP) (netip.Addr, bool)
- func IsEqualMultiURL(a, b MultiURL) 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 LookupIPAddr
- type MultiURL
- func MultiURLFromURL(ctx context.Context, u *url.URL, resolve LookupIPAddr) (MultiURL, error)
- func NewMultiURL(scheme string, addresses []netip.Addr, port uint16) MultiURL
- func ParseMultiURL(addr string) (MultiURL, error)
- func ParseURL(ctx context.Context, addr string, resolve LookupIPAddr) (MultiURL, error)
- type NewConnectionSet
- type OnceCloseListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEqualMultiURL ¶ added in v17.8.0
func ListenConfigWithOSTCPKeepAlive ¶
func ListenConfigWithOSTCPKeepAlive() *net.ListenConfig
ListenConfigWithOSTCPKeepAlive return a net.ListeConfig with OS-level KeepAlive settings.
Types ¶
type ConnectionSet ¶ added in v17.5.0
type ListenerMetrics ¶ added in v17.5.0
type ListenerMetrics struct { Log *slog.Logger NewSet NewConnectionSet GCPeriod time.Duration ErrRep errz.ErrReporter // contains filtered or unexported fields }
func (*ListenerMetrics) RunGC ¶ added in v17.5.0
func (m *ListenerMetrics) RunGC(ctx context.Context)
type LookupIPAddr ¶ added in v17.8.1
type MultiURL ¶ added in v17.8.0
type MultiURL struct {
// contains filtered or unexported fields
}
MultiURL is an immutable URL that has scheme, port, and one or more IP addresses.
func MultiURLFromURL ¶ added in v17.8.0
MultiURLFromURL turns a URL into a MultiURL. The provided URL must: - not be an opaque. - have a scheme. - host must be an IP address or a domain to be resolved. - have a port. Context is used for DNS resolution when resolve is provided and the host is not an IP address.
func NewMultiURL ¶ added in v17.8.0
func ParseMultiURL ¶ added in v17.8.0
ParseMultiURL parses addr according to the following opaque URL schema: scheme:ip[,ip]|port
type NewConnectionSet ¶ added in v17.5.0
type NewConnectionSet func(name string, ttl time.Duration) (ConnectionSet, error)
type OnceCloseListener ¶ added in v17.5.0
OnceCloseListener wraps a net.Listener, protecting it from multiple Close calls.
func (*OnceCloseListener) Close ¶ added in v17.5.0
func (oc *OnceCloseListener) Close() error
Click to show internal directories.
Click to hide internal directories.