channel
Module: authority_client::channel
Section titled “Module: authority_client::channel”Contents
Section titled “Contents”Enums
BuildChannelError- Error building the Authority channel.
Functions
build_channel- Build a lazily connecting tonic channel to the Authority.
firma_sidecar::authority_client::channel::BuildChannelError
Section titled “firma_sidecar::authority_client::channel::BuildChannelError”Enum
Error building the Authority channel.
Variants:
InvalidUrl(String)- The URL could not be parsed as a tonic endpoint.MissingCaCert- Anhttps://URL was given without a CA certificate.PartialClientIdentity- Exactly one of client cert / client key was provided.UnsupportedScheme(String)- The URL scheme is neither http nor https.MissingScheme- The URL had no scheme.Tls(String)- TLS configuration was rejected by tonic.
Traits: Error
Trait Implementations:
- Debug
fn fmt(self: &Self, f: & mut $crate::fmt::Formatter) -> $crate::fmt::Result
- Display
fn fmt(self: &Self, __formatter: & mut ::core::fmt::Formatter) -> ::core::fmt::Result
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; bothSomeor bothNone.
Errors
Section titled “Errors”Returns [BuildChannelError] when the URL/scheme is invalid, an https://
URL has no CA cert, the client identity is partial, or TLS config is bad.
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]>) -> Result<tonic::transport::Channel, BuildChannelError>