pub struct ReplicationTlsConfig {
pub cert_path: PathBuf,
pub key_path: PathBuf,
pub ca_cert_path: PathBuf,
pub require_client_cert: bool,
}Expand description
TLS configuration for replication
Fields§
§cert_path: PathBufPath to the certificate file (PEM format)
key_path: PathBufPath to the private key file (PEM format)
ca_cert_path: PathBufPath to the CA certificate for verifying peers (PEM format)
require_client_cert: boolWhether to require client certificates (mTLS)
Implementations§
Source§impl ReplicationTlsConfig
impl ReplicationTlsConfig
Sourcepub fn new(cert_path: PathBuf, key_path: PathBuf, ca_cert_path: PathBuf) -> Self
pub fn new(cert_path: PathBuf, key_path: PathBuf, ca_cert_path: PathBuf) -> Self
Create a new TLS configuration
Sourcepub fn build_acceptor(&self) -> Result<TlsAcceptor, TlsError>
pub fn build_acceptor(&self) -> Result<TlsAcceptor, TlsError>
Build a TLS acceptor for the primary node (server)
Sourcepub fn build_connector(&self) -> Result<TlsConnector, TlsError>
pub fn build_connector(&self) -> Result<TlsConnector, TlsError>
Build a TLS connector for the passive node (client)
Trait Implementations§
Source§impl Clone for ReplicationTlsConfig
impl Clone for ReplicationTlsConfig
Source§fn clone(&self) -> ReplicationTlsConfig
fn clone(&self) -> ReplicationTlsConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReplicationTlsConfig
impl RefUnwindSafe for ReplicationTlsConfig
impl Send for ReplicationTlsConfig
impl Sync for ReplicationTlsConfig
impl Unpin for ReplicationTlsConfig
impl UnwindSafe for ReplicationTlsConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more