Skip to content

Commit

Permalink
docs for DNS_CACHE
Browse files Browse the repository at this point in the history
  • Loading branch information
meowjesty committed Aug 18, 2023
1 parent d2703f7 commit c464540
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mirrord/layer/src/socket/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ use crate::{
OUTGOING_IGNORE_LOCALHOST, OUTGOING_SELECTOR, REMOTE_UNIX_STREAMS, TARGETLESS,
};

/// Holds the pair of [`SocketAddr`] with their hostnames, resolved through [`getaddrinfo`].
///
/// Used by [`connect_outgoing`] to retrieve the hostname from the address that the user called
/// [`connect`] with, so we can resolve it locally when neccessary.
pub(super) static DNS_CACHE: LazyLock<DashMap<SocketAddr, String>> =
LazyLock::new(|| DashMap::with_capacity(8));

Expand Down

0 comments on commit c464540

Please sign in to comment.