Skip to main content

Crate olai_http

Crate olai_http 

Source
Expand description

Unified cloud credential abstraction and HTTP client for AWS, Azure, GCP, and Databricks.

This crate provides a single authenticated HTTP client, CloudClient, that signs outgoing requests for any supported cloud provider. Rather than pulling in a separate vendor SDK for each cloud, a service constructs one CloudClient per provider and issues requests through a familiar, reqwest-style builder (CloudRequestBuilder). Every provider is reached through the same RequestSigner trait, so credential resolution, token refresh, and request signing are uniform across clouds. The credential machinery is extracted from the object_store crate’s internal client.

§Providers

Each provider has a builder under its own module and a matching CloudClient constructor:

For a static token or no authentication at all, use CloudClient::new_with_token or CloudClient::new_unauthenticated.

§Examples

use olai_http::CloudClient;

let client = CloudClient::new_with_token("my-token");
let resp = client
    .get("https://api.example.com/data")
    .send()
    .await?;
println!("status: {}", resp.status());

Enable the recording feature to capture HTTP interactions to JSON (with sensitive headers redacted) for test replay.

Re-exports§

pub use service::ReqwestService;
pub use service::SpawnService;

Modules§

aws
azure
databricks
Databricks Unified Auth implementation.
gcp
service

Structs§

Certificate
Represents a CA certificate provided by the user.
ClientOptions
HTTP client configuration for remote object stores
CloudClient
An authenticated HTTP client for cloud provider APIs.
CloudRequestBuilder
A builder for a single request issued through a CloudClient.
RetryConfig
The configuration for how to respond to request errors.
SignerChain
Tries signers in order; uses the first that succeeds without error.
StaticCredentialProvider
A static set of credentials
TemporaryToken
A temporary authentication token with an associated expiry
TokenCache
Thread-safe cache for a TemporaryToken that proactively refreshes before the token expires.

Enums§

ClientConfigKey
Configuration keys for ClientOptions
Error
RetryError
Retry request error
SendRawError
The error returned by CloudRequestBuilder::send_raw.

Traits§

CredentialProvider
Provides credentials for use when signing requests.
RequestSigner
Applies authentication to a built reqwest request.

Type Aliases§

Result