Documentation
¶
Overview ¶
Package netsetup defines network preparation deadlines and recoverable DNS retries.
Index ¶
Constants ¶
const ( // ResolveTimeout allows the system resolver to try alternate nameservers before a lookup is abandoned. ResolveTimeout = 30 * time.Second // DialTimeout bounds DNS resolution and TCP connection establishment, independently of protocol handshakes. DialTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RetryNotice ¶
type RetryNotice struct {
// contains filtered or unexported fields
}
RetryNotice reports prolonged failed attempts without logging every retry. It is owned by one recovery loop.
func NewRetryNotice ¶
func NewRetryNotice(logger *slog.Logger, operation string) *RetryNotice
NewRetryNotice starts a quiet 30-second preparation window before failed attempts can produce warnings.
func (*RetryNotice) Failed ¶
func (n *RetryNotice) Failed(attributes ...any)
Failed emits at most one warning per minute after the initial quiet window.
func (*RetryNotice) Recovered ¶
func (n *RetryNotice) Recovered()
Recovered reports recovery only after a warning and resets the quiet window for the next outage.