channel
Module: authority_client::channel
Section titled “Module: authority_client::channel”Contents
Section titled “Contents”Functions
build_channel- Build a lazily connecting tonic channel to the Authority.
firma_sidecar::authority_client::channel::build_channel
Section titled “firma_sidecar::authority_client::channel::build_channel”Function
Build a lazily connecting tonic channel to the Authority.
ca_cert_pem— PEM CA cert to verify the Authority’s server TLS cert. Required whenurluseshttps://.client_cert_pem/client_key_pem— PEM client cert + key for mTLS. Both must beSomeor bothNone. Used when the Authority requires client certificates (mtls_client_ca_cert_pathis set on the Authority).
Errors
Section titled “Errors”Returns an error if the URL cannot be parsed, TLS configuration is
invalid, or an https:// URL is provided without a CA certificate.
fn build_channel(url: &str, connect_timeout: std::time::Duration, ca_cert_pem: Option<&[u8]>, client_cert_pem: Option<&[u8]>, client_key_pem: Option<&[u8]>) -> anyhow::Result<tonic::transport::Channel>