mirror of https://github.com/Icinga/icinga2.git
Implement UNIX domain socket support for the RedisWriter class
refs #4991
This commit is contained in:
parent
7cbd30f93e
commit
8ad567ce99
|
@ -36,9 +36,13 @@ void RedisWriter::Start(bool runtimeCreated)
|
|||
boost::thread thread(boost::bind(&RedisWriter::HandleEvents, this));
|
||||
thread.detach();
|
||||
|
||||
String path = GetPath();
|
||||
String host = GetHost();
|
||||
|
||||
m_Context = redisConnect(host.CStr(), GetPort());
|
||||
if (path.IsEmpty())
|
||||
m_Context = redisConnect(host.CStr(), GetPort());
|
||||
else
|
||||
m_Context = redisConnectUnix(path.CStr());
|
||||
|
||||
String password = GetPassword();
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ class RedisWriter : ConfigObject
|
|||
[config] int port {
|
||||
default {{{ return 6379; }}}
|
||||
};
|
||||
[config] String path;
|
||||
[config] String password;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue