Skip to main content

Module client

Module client 

Source
Expand description

HTTP transport, JWT auth, opt-in retry, and tracing for the Stream API.

Connection defaults match getstream-go: max 5 connections per host, 55s idle timeout, 30s request timeout, 10s connect timeout. Requests are authenticated with a server JWT ({"server": true}) sent as Authorization + Stream-Auth-Type: jwt, and every request carries the api_key query param.

The HTTP client itself is crate-private. Public tunables (ClientConfig, RetryConfig, NetworkLimits) are re-exported at the crate root for crate::Stream::with_config.

Structs§

ClientConfig
Tunables for the HTTP client. Use ClientConfig::default for getstream-go defaults and override fields as needed before constructing a crate::Stream.
NetworkLimits
Limits for payloads buffered by the HTTP and WebSocket transports.
RetryConfig
Opt-in auto-retry policy. Disabled by default: exactly one attempt, errors surface unchanged. When enabled, only GET/HEAD requests failing with HTTP 429 or a transport error are retried, and never when the API marked the error unrecoverable. Mirrors getstream-go’s WithRetry.

Constants§

DEFAULT_BASE_URL
Default coordinator base URL (matches getstream-go’s DefaultBaseURL).
DEFAULT_MAX_RESPONSE_BODY_BYTES
Default maximum body accepted from coordinator HTTP endpoints (16 MiB).
DEFAULT_MAX_WEBSOCKET_MESSAGE_BYTES
Default maximum inbound SFU/coordinator WebSocket frame and message size (4 MiB).