Struct tikv_client::SecurityManager[][src]

pub struct SecurityManager {
    ca: Vec<u8, Global>,
    cert: Vec<u8, Global>,
    key: PathBuf,
}

Manages the TLS protocol

Fields

ca: Vec<u8, Global>

The PEM encoding of the server’s CA certificates.

cert: Vec<u8, Global>

The PEM encoding of the server’s certificate chain.

key: PathBuf

The path to the file that contains the PEM encoding of the server’s private key.

Implementations

impl SecurityManager[src]

pub fn load(
    ca_path: impl AsRef<Path>,
    cert_path: impl AsRef<Path>,
    key_path: impl Into<PathBuf>
) -> Result<SecurityManager, Error>
[src]

Load TLS configuration from files.

pub fn connect<Factory, Client>(
    &self,
    env: Arc<Environment>,
    addr: &str,
    factory: Factory
) -> Result<Client, Error> where
    Factory: FnOnce(Channel) -> Client, 
[src]

Connect to gRPC server using TLS connection. If TLS is not configured, use normal connection.

Trait Implementations

impl Default for SecurityManager[src]

Auto Trait Implementations

impl RefUnwindSafe for SecurityManager

impl Send for SecurityManager

impl Sync for SecurityManager

impl Unpin for SecurityManager

impl UnwindSafe for SecurityManager

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]