Closed melonux closed 3 years ago
Meir's answer on issue #115 may possibly point you in the right direction. Otherwise, could you please clarify what you're trying to do?
Yes. It is related question. I wrote a custom redis data_type based on redismodule-rs. It works on single redis node, but cannot sync data to other redis nodes in sentinel mode. I need to implement RDB / AOF for my data_type. I have read API reference, but how to write them in rust is unknown.
static MY_REDIS_TYPE: RedisType = RedisType::new(
...
raw::RedisModuleTypeMethods {
version: raw::REDISMODULE_TYPE_METHOD_VERSION as u64,
rdb_load: None, // It seems the binding is in bindings.rs generated by bindgen from redismodule.h
rdb_save: None,
aof_rewrite: None,
free: Some(free),
@melonux please see the RedisJSON code for an example on how to write custom RDB load/save functions in Rust: https://github.com/RedisJSON/RedisJSON/blob/master/src/redisjson.rs
many thanks.
Need example. Thank you in advance.