Beispiel #1
0
void HelloTypeAofRewrite(RedisModuleIO *aof, RedisModuleString *key, void *value) {
    struct HelloTypeObject *hto = value;
    struct HelloTypeNode *node = hto->head;
    while(node) {
        RedisModule_EmitAOF(aof,"HELLOTYPE.INSERT","sl",key,node->value);
        node = node->next;
    }
}
Beispiel #2
0
void UniqueTypeAofRewrite(RedisModuleIO *aof, RedisModuleString *key, void *value) {
    unique *unique = value;
    listIter *it = listGetIterator(unique->l, AL_START_HEAD);
    listNode *node;
    sds k, v;
    for (node = listNext(it); node; node = listNext(it)) {
        dictEntry *en = node->value;
        k = en->key;
        v = en->v.val;
        RedisModule_EmitAOF(aof,"unique.pushup","sbb",key,k, sdslen(k), v, sdslen(v));
    }

}