Modules§
Functions§
- cleanup_
stale_ instances - Cleanup function to remove stale instances Should be called periodically to clean up old instances
- clear_
all_ records - close_
database - Properly closes a database connection and frees all associated resources This function should be called before hot restart or app termination
- create_
db - delete_
by_ id - free_
c_ string - Frees memory allocated for C string responses Should be called after consuming the response from any FFI function
- get_all
- get_
by_ id - get_
current_ generation - Get the current generation counter value
- invalidate_
instance - Mark an instance as invalid (useful for hot reload scenarios)
- is_
database_ valid - Validates that a database pointer is still valid and registered Also updates last_used timestamp for the instance
- ping_
database - Ping function for heartbeat monitoring Returns the current generation and status of the instance
- push_
data - reset_
database - update_
data - validate_
instance_ generation - Validates that a database instance is from the expected generation This helps detect hot reload scenarios where instances become stale