2 #include "../acl_cpp_define.hpp" 3 #include "../stdlib/string.hpp" 6 #if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE) 20 std::vector<redis_stream_field>
fields;
174 bool xadd(
const char* key,
const std::map<string, string>& fields,
175 string& result,
const char*
id =
"*");
176 bool xadd(
const char* key,
const std::vector<string>& names,
177 const std::vector<string>& values,
178 string& result,
const char*
id =
"*");
179 bool xadd(
const char* key,
const std::vector<const char*>& names,
180 const std::vector<const char*>& values,
string& result,
181 const char*
id =
"*");
182 bool xadd(
const char* key,
const char* names[],
const size_t names_len[],
183 const char* values[],
const size_t values_len[],
size_t argc,
184 string& result,
const char*
id =
"*");
185 bool xadd_with_maxlen(
const char* key,
size_t maxlen,
186 const std::map<string, string>& fields,
string& result,
187 const char*
id =
"*");
195 int xlen(
const char* key);
206 int xdel(
const char* key,
const char*
id);
216 int xdel(
const char* key,
const std::vector<string>& ids);
217 int xdel(
const char* key,
const std::vector<const char*>& ids);
229 int xtrim(
const char* key,
size_t maxlen,
bool tilde =
false);
247 const std::map<string, string>& streams,
248 size_t count = 1000, ssize_t block = 0);
280 const char* consumer,
const std::map<string, string>& streams,
281 size_t count = 1000, ssize_t block = 0,
bool noack =
false);
294 const char* group,
const char* consumer,
295 const std::map<string, string>& streams,
296 size_t count = 1000, ssize_t block = 0);
310 const char* start =
"-",
const char* end =
"+",
311 size_t count = 1000);
325 const char* start =
"+",
const char* end =
"-",
326 size_t count = 1000);
347 bool xclaim(std::vector<redis_stream_message>& messages,
348 const char* key,
const char* group,
const char* consumer,
349 long min_idle_time,
const std::vector<string>& ids,
350 size_t idle = 0,
long long time_ms = -1,
351 int retry_count = -1,
bool force =
false);
356 bool xclaim_with_justid(std::vector<string>& messages_ids,
357 const char* key,
const char* group,
const char* consumer,
358 long min_idle_time,
const std::vector<string>& ids,
359 size_t idle = 0,
long long time_ms = -1,
360 int retry_count = -1,
bool force =
false);
372 int xack(
const char* key,
const char* group,
const char*
id);
382 int xack(
const char* key,
const char* group,
383 const std::vector<string>& ids);
384 int xack(
const char* key,
const char* group,
385 const std::vector<const char*>& ids);
386 int xack(
const char* key,
const char* group,
387 const std::list<string>& ids,
size_t size);
388 int xack(
const char* key,
const char* group,
389 const std::list<const char*>& ids,
size_t size);
400 bool xpending_summary(
const char* key,
const char* group,
415 const char* key,
const char* group,
416 const char* start_id =
"-",
const char* end_id =
"+",
417 size_t count = 1,
const char* consumer = NULL);
426 bool xgroup_help(std::vector<string>& result);
439 bool xgroup_create(
const char* key,
const char* group,
440 const char*
id =
"$",
bool mkstream =
true);
452 int xgroup_destroy(
const char* key,
const char* group);
453 bool xgroup_setid(
const char* key,
const char* group,
454 const char*
id =
"$");
465 int xgroup_delconsumer(
const char* key,
const char* group,
466 const char* consumer);
475 bool xinfo_help(std::vector<string>& result);
485 bool xinfo_consumers(
const char* key,
const char* group,
486 std::map<string, redis_xinfo_consumer>& result);
494 bool xinfo_groups(
const char* key,
495 std::map<string, redis_xinfo_group>& result);
510 void build(
const char* cmd,
const char* key,
const char*
id,
511 const std::map<string, string>& fields);
512 void build(
const char* cmd,
const char* key,
const char*
id,
513 const std::vector<string>& names,
514 const std::vector<string>& values);
515 void build(
const char* cmd,
const char* key,
const char*
id,
516 const std::vector<const char*>& names,
517 const std::vector<const char*>& values);
518 void build(
const char* cmd,
const char* key,
const char*
id,
519 const char* names[],
const size_t names_len[],
520 const char* values[],
const size_t values_len[],
size_t argc);
521 void build(
const std::map<string, string>& streams,
size_t i,
522 size_t count, ssize_t block,
bool noack =
false);
523 void xread_build(
const std::map<string, string>& streams,
524 size_t count, ssize_t block);
525 void xreadgroup_build(
const char* group,
const char* consumer,
526 const std::map<string, string>& streams,
527 size_t count, ssize_t block,
bool noack);
532 const char* key,
const char* start,
const char* end,
size_t count);
541 void xclaim_build(
const char* key,
const char* group,
542 const char* consumer,
long min_idle_time,
543 const std::vector<string>& ids,
size_t idle,
long long time_ms,
544 int retry_count,
bool force,
bool justid);
550 #endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)
redis_pending_message(void)
#define ACL_CPP_DEPRECATED
redis_pending_consumer(void)
redis_stream_message last_entry
std::vector< redis_stream_field > fields
unsigned long long elapsed
std::vector< redis_stream_message > messages
redis_xinfo_consumer(void)
redis_stream_message first_entry
std::vector< redis_pending_consumer > consumers
std::map< string, redis_pending_message > messages