foundationdb

Module api

Source
Expand description

Configuration of foundationDB API and Network

Provides a safe wrapper around the following C API calls:

The network lifecycle is tracked by a process-global state machine (Uninitialized -> ApiVersionSelected -> Running -> Stopped). Booting is safe and idempotent, the network is started lazily by crate::Database constructors if needed, and it runs until process exit: an atexit hook stops it and joins the network thread, as required by the C API. Applications that manage their own shutdown can call disable_stop_on_exit and/or stop_network.

The automatic stop at process exit is meant for tests and short-lived tools. In a production application, prefer a clean teardown: the network thread is the event loop driving every transaction and you may still have on-going operations at exit time. Finish or cancel your work, drop the crate::Database handles, then call stop_network yourself.

Structs§

  • A Builder with which different versions of the Fdb C API can be initialized
  • Kept for backward compatibility: dropping it does nothing.
  • A Builder to configure network options and start the network event loop.

Functions§