pub struct DakeraClientBuilder { /* private fields */ }Expand description
Builder for DakeraClient
Implementations§
Source§impl DakeraClientBuilder
impl DakeraClientBuilder
Sourcepub fn api_key(self, key: impl Into<String>) -> Self
pub fn api_key(self, key: impl Into<String>) -> Self
Set the API key for Bearer authentication.
If not set explicitly, the builder will try to read DAKERA_API_KEY
from the environment at build time.
Sourcepub fn ode_url(self, ode_url: impl Into<String>) -> Self
pub fn ode_url(self, ode_url: impl Into<String>) -> Self
Set the base URL of the dakera-ode sidecar (ODE-2).
Required to call DakeraClient::extract_entities.
Sourcepub fn timeout_secs(self, secs: u64) -> Self
pub fn timeout_secs(self, secs: u64) -> Self
Set the request timeout in seconds
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Set the connection establishment timeout (defaults to timeout).
Sourcepub fn retry_config(self, config: RetryConfig) -> Self
pub fn retry_config(self, config: RetryConfig) -> Self
Set fine-grained retry configuration.
Sourcepub fn max_retries(self, max_retries: u32) -> Self
pub fn max_retries(self, max_retries: u32) -> Self
Set the maximum number of retry attempts.
Sourcepub fn user_agent(self, user_agent: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
Set a custom user agent
Sourcepub fn build(self) -> Result<DakeraClient>
pub fn build(self) -> Result<DakeraClient>
Build the client
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DakeraClientBuilder
impl RefUnwindSafe for DakeraClientBuilder
impl Send for DakeraClientBuilder
impl Sync for DakeraClientBuilder
impl Unpin for DakeraClientBuilder
impl UnsafeUnpin for DakeraClientBuilder
impl UnwindSafe for DakeraClientBuilder
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
Mutably borrows from an owned value. Read more