Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { // Get retrieves v from Backend. The returned v is a deepcopy of the original msg // if the key is stored in the cache. Otherwise, v is nil. // If allowExpired, v might be expired as long as the key is in the cache. // Note: The caller should change the TTLs and id of v. Get(ctx context.Context, key string, allowExpired bool) (v *dns.Msg, storedTime, expirationTime time.Time, err error) // Store stores a deepcopy of v into Backend. v cannot be nil. // If expirationTime is already passed, Store is a noop. Store(ctx context.Context, key string, v *dns.Msg, storedTime, expirationTime time.Time) (err error) // Closer closes the cache backend. io.Closer }
Backend represents a DNS cache backend.
Click to show internal directories.
Click to hide internal directories.