pub struct ClientBuilder { /* private fields */ }Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn additional_root_certificates_pem(
self,
pem: impl AsRef<[u8]>,
) -> Result<Self>
pub fn additional_root_certificates_pem( self, pem: impl AsRef<[u8]>, ) -> Result<Self>
Trust additional PEM root certificates, preserving the bundled public roots.
Accepts one or more CERTIFICATE entries, and can be called repeatedly.
Invalid PEM and bundles without certificates are rejected. Certificate
chains and hostnames are still verified for every request, including
worker polling and external payload transfers.
Sourcepub fn danger_accept_invalid_certs(self, accept: bool) -> Self
pub fn danger_accept_invalid_certs(self, accept: bool) -> Self
Disable TLS certificate and hostname verification for every request
this client makes, including worker polling and external payload
transfers. The default is false (verified).
Any party on the network path can then read and change traffic,
including bearer tokens. Prefer
ClientBuilder::additional_root_certificates_pem for a private CA.
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn metrics_recorder(self, recorder: Arc<dyn MetricsRecorder>) -> Self
pub fn metrics_recorder(self, recorder: Arc<dyn MetricsRecorder>) -> Self
Configure stable request metrics. Newly constructed workers inherit this recorder.
Sourcepub fn worker_protocol_version(self, version: WorkerProtocolVersion) -> Self
pub fn worker_protocol_version(self, version: WorkerProtocolVersion) -> Self
Explicitly select 1.19 for an older Server. Cooperation requires 1.20.
Sourcepub fn token(self, token: Option<String>) -> Self
pub fn token(self, token: Option<String>) -> Self
Set the shared static token. Build validates every supplied token without
trimming it. None is absent; Some("") remains a supplied empty token.
Sourcepub fn control_token(self, token: Option<String>) -> Self
pub fn control_token(self, token: Option<String>) -> Self
Set the control-plane token, which takes precedence over the shared token even when empty. Build also validates tokens for unused roles.
Sourcepub fn worker_token(self, token: Option<String>) -> Self
pub fn worker_token(self, token: Option<String>) -> Self
Set the worker-plane token, which takes precedence over the shared token even when empty. Build also validates tokens for unused roles.
pub fn namespace(self, namespace: impl Into<String>) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Sourcepub fn max_external_payload_bytes(self, bytes: usize) -> Self
pub fn max_external_payload_bytes(self, bytes: usize) -> Self
Maximum unique external-payload bytes fetched per response (default 64 MiB). References are fetched only from this client’s authenticated runtime.