acl  3.5.3.0
redis_sentinel.hpp
浏览该文件的文档.
1 #pragma once
2 #include "../acl_cpp_define.hpp"
3 #include <vector>
4 #include "redis_command.hpp"
5 #include "redis_master.hpp"
6 #include "redis_slave.hpp"
7 
8 #if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)
9 
10 namespace acl
11 {
12 
14 {
15 public:
16  redis_sentinel(void);
18  virtual ~redis_sentinel(void);
19 
20  bool sentinel_master(const char* name, redis_master& out);
21  bool sentinel_masters(std::vector<redis_master>& out);
22  bool sentinel_slaves(const char* master_name,
23  std::vector<redis_slave>& out);
24 
25  bool sentinel_get_master_addr_by_name(const char* master_name,
26  string& ip, int& port);
27  int sentinel_reset(const char* pattern);
28  bool sentinel_failover(const char* master_name);
29 
30  bool sentinel_flushconfig(void);
31  bool sentinel_remove(const char* master_name);
32  bool sentinel_monitor(const char* master_name, const char* ip,
33  int port, int quorum);
34  bool sentinel_set(const char* master_name, const char* name,
35  const char* value);
36  bool sentinel_set(const char* master_name, const char* name,
37  unsigned value);
38 };
39 
40 }
41 
42 #endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)
HTTP_API void const char * name
Definition: lib_http.h:620
#define ACL_CPP_API