Crate sled Copy item path Source sled_close ⚠ Close a sled lock-free log-structured tree. sled_compare_and_swap ⚠ Compare and swap.
Returns 1 if successful, 0 if unsuccessful.
Otherwise sets actual_val
and actual_vallen
to the current value,
which must be freed using sled_free_buf
by the caller if non-null.
actual_val
will be null and actual_vallen
0 if the current value is not
set. sled_config_flush_every_ms ⚠ Set the configured IO buffer flush interval in milliseconds. sled_config_set_cache_capacity ⚠ Set the configured cache capacity in bytes. sled_config_set_path ⚠ Set the configured file path. The caller is responsible for freeing the path
string after calling this (it is copied in this function). sled_config_use_compression ⚠ Configure the use of the zstd compression library. sled_create_config ⚠ Create a new configuration. sled_del ⚠ Delete the value of a key. sled_free_buf ⚠ Free a buffer originally allocated by sled. sled_free_config ⚠ Destroy a configuration. sled_free_iter ⚠ Free an iterator. sled_get ⚠ Get the value of a key.
Caller is responsible for freeing the returned value with sled_free_buf
if
it’s non-null. sled_iter_next ⚠ Get they next kv pair from an iterator.
Caller is responsible for freeing the key and value with sled_free_buf
.
Returns 0 when exhausted. sled_open_db ⚠ Open a sled lock-free log-structured tree. Consumes the passed-in config. sled_scan_prefix ⚠ Iterate over tuples which have specified key prefix.
Caller is responsible for freeing the returned iterator with
sled_free_iter
. sled_set ⚠ Set a key to a value.