tranger2_open_rt_disk()
#
Opens a real-time disk-based iterator for monitoring changes in a topic. The function allows tracking new records appended to the topic by monitoring disk events.
Prototype
json_t *tranger2_open_rt_disk(
json_t *tranger,
const char *topic_name,
const char *key, // if empty receives all keys, else only this key
json_t *match_cond, // owned
tranger2_load_record_callback_t load_record_callback, // called on append new record on disk
const char *rt_id, // rt disk id, REQUIRED
const char *creator,
json_t *extra // owned, user data, this json will be added to the return iterator
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
Pointer to the TimeRanger database instance. |
|
|
Name of the topic to monitor. |
|
|
Specific key to monitor. If empty, all keys are monitored. |
|
|
JSON object containing conditions for filtering records. Owned by the function. |
|
|
Callback function invoked when a new record is appended to the disk. |
|
|
Unique identifier for the real-time disk iterator. Required. |
|
|
Identifier of the entity creating the iterator. |
|
|
Additional user data to be associated with the iterator. Owned by the function. |
Return Value
Returns a JSON object representing the real-time disk iterator. The caller does not own the returned object.
Notes
This function is used when monitoring real-time changes in a topic via disk events. The iterator remains active until explicitly closed using tranger2_close_rt_disk()
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples