pub struct ClientBuilder { /* private fields */ }Expand description
Configures a blocking Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn worker_threads(self, threads: usize) -> Self
pub fn worker_threads(self, threads: usize) -> Self
How many threads the owned runtime uses. Defaults to one.
One is right for a client used from a single thread. Raise it when the same client is shared across threads that make concurrent calls.
Sourcepub fn api_key(self, api_key: impl Into<String>) -> Self
pub fn api_key(self, api_key: impl Into<String>) -> Self
Bearer token sent as Authorization on every request to the server.
Sourcepub fn gpu(self, gpu: impl Into<String>) -> Self
pub fn gpu(self, gpu: impl Into<String>) -> Self
Default machine profile, optionally pool-qualified as "pool/profile".
Sourcepub fn options(self, options: Value) -> Self
pub fn options(self, options: Value) -> Self
Default runtime options, shallow-merged under any per-call options.
Sourcepub fn max_connections(self, max: usize) -> Self
pub fn max_connections(self, max: usize) -> Self
Cap on pooled connections.
Sourcepub fn max_concurrency(self, max: usize) -> Self
pub fn max_concurrency(self, max: usize) -> Self
Cap on requests in flight at once.
Sourcepub fn control_plane_url(self, url: impl Into<String>) -> Self
pub fn control_plane_url(self, url: impl Into<String>) -> Self
Control-plane root, required by the connections namespace.
Sourcepub fn org(self, org: impl Into<String>) -> Self
pub fn org(self, org: impl Into<String>) -> Self
Organisation slug, required by the connections namespace.
Sourcepub fn base_url_headers(self, headers: HashMap<String, String>) -> Self
pub fn base_url_headers(self, headers: HashMap<String, String>) -> Self
Extra headers for an HTTP edge in front of the gateway.
Sourcepub fn wait_for_capacity(self, wait: bool) -> Self
pub fn wait_for_capacity(self, wait: bool) -> Self
Whether calls wait out provisioning by default.
Sourcepub fn provision_timeout(self, timeout: Duration) -> Self
pub fn provision_timeout(self, timeout: Duration) -> Self
Default wall-clock budget for a call including its retries.
Sourcepub fn max_oom_retries(self, retries: u32) -> Self
pub fn max_oom_retries(self, retries: u32) -> Self
Default cap on RESOURCE_EXHAUSTED retries.