Documentation
¶
Overview ¶
Package cache provides small cache key and strategy helpers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Decision ¶
type Decision int
Decision indicates which global cache bucket should store a result.
type ErrorKind ¶
type ErrorKind int
ErrorKind classifies query failures for caching decisions.
const ( // ErrorNone indicates there was no query error. ErrorNone ErrorKind = iota // ErrorNetwork covers timeouts, temporary network failures, or unreachable hosts. ErrorNetwork // ErrorCanceled covers context cancellation or deadline exceeded. ErrorCanceled // ErrorOther covers non-network errors (invalid query, parse errors, etc.). ErrorOther )
type KeyParts ¶
type KeyParts struct {
ServerAddr string
Name string
Qtype string
Qclass string
DNSSEC bool
Recurse bool
UseVC bool
EDNSSize int
EDNSVersion *uint8
EDNSZ *uint16
EDNSRcode *uint8
EDNSData []dns.EDNS0
}
KeyParts defines the granularity for global DNS query caching. The key is intentionally sensitive to transport and EDNS settings, since they can affect response size, truncation, and DNSSEC behavior.
Click to show internal directories.
Click to hide internal directories.