Skip to main content

Module rest_store

Module rest_store 

Source
Expand description

A generic REST/HTTP-backed ObjectStore.

RestObjectStore implements ObjectStore over a REST “file API” – a service that exposes list/read/write of files behind authenticated HTTP endpoints rather than as a plain blob store – so the default engine can read and write Delta tables through it with no service-specific logic in the kernel.

The caller supplies everything service-specific through two pieces:

  • AuthHeaderProvider – headers attached to every request (auth, identity). Consulted per request, so an implementation can refresh short-lived credentials.
  • RestEndpointConfig – the REST dialect: path-to-URL mapping, list and write query parameters, and list-response JSON field names. HTTP 404 -> NotFound and 409 -> AlreadyExists are mapped in RestObjectStore.

Only the operations kernel needs are implemented (read, head, list, write, delete); the rest return ObjectStoreError::NotSupported.

Structs§

HeaderMap
A specialized multimap for header names and values.
RefreshingHeaderProvider
An AuthHeaderProvider that produces headers via a closure returning (headers, Option<ttl>). Some(ttl) caches the headers until a fixed safety margin before ttl elapses, then produces fresh ones; None re-runs the closure on every request.
RestClientOptions
Options for the reqwest::Client backing a RestObjectStore. All fields are optional; the default value yields a plain client. When cert_path, key_path, and ca_path are all set, mutual TLS is enabled.
RestEndpointConfig
Per-backend HTTP/JSON settings for a RestObjectStore.
RestObjectStore
A generic REST/HTTP-backed ObjectStore. See the module docs.
StaticHeaderProvider
An AuthHeaderProvider that always returns the same fixed headers.

Traits§

AuthHeaderProvider
Supplies the HTTP headers attached to every request a RestObjectStore makes.

Functions§

build_rest_client
Build a reqwest::Client from RestClientOptions. Enables mTLS when cert_path, key_path, and ca_path are all present.
headers_from_pairs
Build a HeaderMap from (name, value) pairs, erroring if a name or value is not a valid HTTP header.