pub struct ClientBuilder { /* private fields */ }Expand description
Configures a Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
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 timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Per-attempt HTTP timeout. Defaults to 30 seconds.
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.
These are credentials: they are sent only to the exact origin of base_url, which
must therefore be https without embedded userinfo.
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.