pub struct TlsOptions<'a> {
cert_path: Option<&'a str>,
system_roots: bool,
domain: Option<&'a str>,
}Expand description
The TLS settings of a worker or CLI, as given on the command line.
Fields§
§cert_path: Option<&'a str>Path to the trust anchor to verify the orchestrator against (--tls)
system_roots: boolVerify against the host’s system trust store (--tls_system) (if true)
domain: Option<&'a str>The name to verify the orchestrator as, overriding the address (--tls_domain)
Implementations§
Source§impl<'a> TlsOptions<'a>
impl<'a> TlsOptions<'a>
Sourcepub fn from_args(args: &'a ArgMatches) -> Self
pub fn from_args(args: &'a ArgMatches) -> Self
Read the TLS settings from the parsed command-line arguments of a worker or CLI.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Whether the connection to the orchestrator is secured with TLS.
Sourcepub fn client_config(
&self,
address: &str,
) -> Result<ClientTlsConfig, Box<dyn Error>>
pub fn client_config( &self, address: &str, ) -> Result<ClientTlsConfig, Box<dyn Error>>
Build the client-side TLS configuration used by workers and the CLI.
§Arguments
address- the orchestrator address (-a), whose host names the orchestrator
§Returns
A tonic [ClientTlsConfig] holding the trust anchors and the name to authenticate.
§Errors
If the certificate file cannot be read or holds no PEM certificate.
Auto Trait Implementations§
impl<'a> Freeze for TlsOptions<'a>
impl<'a> RefUnwindSafe for TlsOptions<'a>
impl<'a> Send for TlsOptions<'a>
impl<'a> Sync for TlsOptions<'a>
impl<'a> Unpin for TlsOptions<'a>
impl<'a> UnsafeUnpin for TlsOptions<'a>
impl<'a> UnwindSafe for TlsOptions<'a>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].