Trait fred::types::HostMapping
source · pub trait HostMapping:
Send
+ Sync
+ Debug {
// Required method
fn map(&self, ip: &IpAddr, default_host: &str) -> Option<String>;
}Available on crate features
enable-rustls or enable-native-tls or enable-rustls-ring only.Expand description
A trait used for mapping IP addresses to hostnames when processing the CLUSTER SLOTS response.
Required Methods§
sourcefn map(&self, ip: &IpAddr, default_host: &str) -> Option<String>
fn map(&self, ip: &IpAddr, default_host: &str) -> Option<String>
Map the provided IP address to a hostname that should be used during the TLS handshake.
The default_host argument represents the hostname of the node that returned the CLUSTER SLOTS response.
If None is returned the client will use the IP address as the server name during the TLS handshake.