Module Cosmos_eio.Databases

module type Auth_key = Cosmos.Databases_intf.Auth_key
type 'a io = unit -> 'a

A deferred IO computation. Call with () to execute. This is the Eio equivalent of 'a Lwt.t; computations are deferred as thunks so that with_timeout can cancel them via Eio's fiber cancellation.

val with_env : sw:Eio.Switch.t -> < clock : _ Eio.Time.clock ; net : _ Eio.Net.t.. > -> (unit -> 'a) -> 'a

with_env ~sw env f sets up the Eio environment (clock, network, TLS client) required by Database operations. All database calls must happen inside f. Call this once inside Eio_main.run and Eio.Switch.run.

module Response_headers : sig ... end
type cosmos_error = Cosmos.Databases_core.cosmos_error =
  1. | Timeout_error
  2. | Connection_error
  3. | Azure_error of int * Response_headers.t
module Database (Auth_key : Auth_key) : sig ... end