Documentation
¶
Overview ¶
Package errors provides canonical generators for frequently used network errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnClosed ¶
ConnClosed returns a net.Error representing an operation on a closed network connection. The op parameter is the operation being performed (e.g. "read", "write"). The network parameter is the network type (e.g. "tcp", "udp"). src and addr represent the source and destination addresses of the connection.
func ConnRefused ¶
ConnRefused returns an error representing a connection refusal. The n parameter is the network type (e.g. "tcp", "udp"). The a parameter is the address that refused the connection.
func DnsReqErr ¶
DnsReqErr returns a net.DNSError representing a DNS request failure. The host parameter is the hostname that was looked up (e.g. example.com). The srv parameter is the DNS server address (e.g. 8.8.8.8:53).
func ListenDeniedErr ¶
ListenDeniedErr returns an error representing a permission denied when attempting to listen on an address. The n parameter is the network type (e.g. "tcp", "udp"). The a parameter is the address that denied the listen attempt.
func NoSuchHost ¶
NoSuchHost returns a net.Error representing a DNS lookup failure for the specified host. The host parameter is the hostname that was looked up (e.g. example.com). The srv parameter is the DNS server address (e.g. 8.8.8.8:53).
Types ¶
This section is empty.