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. HTTP404 -> NotFoundand409 -> AlreadyExistsare mapped inRestObjectStore.
Only the operations kernel needs are implemented (read, head, list, write, delete); the rest
return ObjectStoreError::NotSupported.
Structs§
- Header
Map - A specialized multimap for header names and values.
- Refreshing
Header Provider - An
AuthHeaderProviderthat produces headers via a closure returning(headers, Option<ttl>).Some(ttl)caches the headers until a fixed safety margin beforettlelapses, then produces fresh ones;Nonere-runs the closure on every request. - Rest
Client Options - Options for the
reqwest::Clientbacking aRestObjectStore. All fields are optional; the default value yields a plain client. Whencert_path,key_path, andca_pathare all set, mutual TLS is enabled. - Rest
Endpoint Config - Per-backend HTTP/JSON settings for a
RestObjectStore. - Rest
Object Store - A generic REST/HTTP-backed
ObjectStore. See the module docs. - Static
Header Provider - An
AuthHeaderProviderthat always returns the same fixed headers.
Traits§
- Auth
Header Provider - Supplies the HTTP headers attached to every request a
RestObjectStoremakes.
Functions§
- build_
rest_ client - Build a
reqwest::ClientfromRestClientOptions. Enables mTLS whencert_path,key_path, andca_pathare all present. - headers_
from_ pairs - Build a
HeaderMapfrom(name, value)pairs, erroring if a name or value is not a valid HTTP header.