-
Notifications
You must be signed in to change notification settings - Fork 952
Expand file tree
/
Copy pathredis_sentinel.hpp
More file actions
40 lines (32 loc) · 1.19 KB
/
redis_sentinel.hpp
File metadata and controls
40 lines (32 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include "../acl_cpp_define.hpp"
#include <vector>
#include "redis_command.hpp"
#include "redis_master.hpp"
#include "redis_slave.hpp"
#if !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)
namespace acl {
class ACL_CPP_API redis_sentinel : virtual public redis_command {
public:
redis_sentinel();
redis_sentinel(redis_client* conn);
virtual ~redis_sentinel();
bool sentinel_master(const char* name, redis_master& out);
bool sentinel_masters(std::vector<redis_master>& out);
bool sentinel_slaves(const char* master_name,
std::vector<redis_slave>& out);
bool sentinel_get_master_addr_by_name(const char* master_name,
string& ip, int& port);
int sentinel_reset(const char* pattern);
bool sentinel_failover(const char* master_name);
bool sentinel_flushconfig();
bool sentinel_remove(const char* master_name);
bool sentinel_monitor(const char* master_name, const char* ip,
int port, int quorum);
bool sentinel_set(const char* master_name, const char* name,
const char* value);
bool sentinel_set(const char* master_name, const char* name,
unsigned value);
};
}
#endif // !defined(ACL_CLIENT_ONLY) && !defined(ACL_REDIS_DISABLE)