mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 23:24:18 +00:00
FS-9775: Committing start of very basic datastore concept, will start tieing in the physical transport layer for replication under new ticket/branch
This commit is contained in:
1 parent
dd1e01cb81
commit
2c6f954461
6 files changed
+196
No files matched your search
@@ -162,6 +162,33 @@ KS_DECLARE(void) blade_handle_datastore_start(blade_handle_t *bh)
|
||||
blade_datastore_create(&bh->datastore, bh->pool);
|
||||
}
|
||||
|
||||
KS_DECLARE(ks_status_t) blade_handle_datastore_store(blade_handle_t *bh, const void *key, int32_t key_length, const void *data, int64_t data_length)
|
||||
{
|
||||
ks_assert(bh);
|
||||
ks_assert(bh->datastore);
|
||||
ks_assert(key);
|
||||
ks_assert(key_length > 0);
|
||||
ks_assert(data);
|
||||
ks_assert(data_length > 0);
|
||||
|
||||
return blade_datastore_store(bh->datastore, key, key_length, data, data_length);
|
||||
}
|
||||
|
||||
KS_DECLARE(ks_status_t) blade_handle_datastore_fetch(blade_handle_t *bh,
|
||||
blade_datastore_fetch_callback_t callback,
|
||||
const void *key,
|
||||
int32_t key_length,
|
||||
void *userdata)
|
||||
{
|
||||
ks_assert(bh);
|
||||
ks_assert(bh->datastore);
|
||||
ks_assert(callback);
|
||||
ks_assert(key);
|
||||
ks_assert(key_length > 0);
|
||||
|
||||
return blade_datastore_fetch(bh->datastore, callback, key, key_length, userdata);
|
||||
}
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
||||
Reference in new issue
Block a user