pub struct ClientOptions { /* private fields */ }Expand description
Configures how a crate::Client reaches Dex.
ClientOptions::new connects to 127.0.0.1:8801 over plaintext gRPC and requires no
inbound Worker endpoint. All Flows use pull Workers.
Implementations§
Source§impl ClientOptions
impl ClientOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates options with the local Dex server default and pull Worker routing.
Sourcepub fn server_address(self, value: impl Into<String>) -> Self
pub fn server_address(self, value: impl Into<String>) -> Self
Sets the FlowService address used for every Client request.
With TLS, accepts host:port, dns:///host:port, or dns://authority/host:port.
Sourcepub fn flow_service_tls(self, value: FlowServiceTlsOptions) -> Self
pub fn flow_service_tls(self, value: FlowServiceTlsOptions) -> Self
Enables TLS for every outbound Client FlowService connection.
Omitted by default, preserving plaintext gRPC. Takes ownership of value and returns
these options with TLS enabled. crate::Client::try_new validates the address,
additional roots, and server name, returning crate::SdkError::InvalidArgument for
invalid input. See FlowServiceTlsOptions for defaults and a complete example.
Sourcepub fn credential(self, value: Arc<dyn Credential>) -> Self
pub fn credential(self, value: Arc<dyn Credential>) -> Self
Sends a bearer token before every FlowService request.
The default sends no authorization metadata. The credential may be called concurrently;
its error fails the request locally. The token uses the configured Dex connection. Enable
TLS with Self::flow_service_tls to protect it. See crate::FileCredential for file rotation.
Trait Implementations§
Source§impl Clone for ClientOptions
impl Clone for ClientOptions
Source§impl Debug for ClientOptions
impl Debug for ClientOptions
Auto Trait Implementations§
impl !RefUnwindSafe for ClientOptions
impl !UnwindSafe for ClientOptions
impl Forget for ClientOptions
impl Freeze for ClientOptions
impl Send for ClientOptions
impl Sync for ClientOptions
impl Unpin for ClientOptions
impl UnsafeUnpin for ClientOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request