package azure-cosmos-db-eio

  1. Overview
  2. Docs

Module Cosmos_eio.DatabasesSource

Sourcetype '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.

Sourceval 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.

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