mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-16 18:24:31 +02:00
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));
|
boost::thread thread(boost::bind(&RedisWriter::HandleEvents, this));
|
||||||
thread.detach();
|
thread.detach();
|
||||||
|
|
||||||
|
String path = GetPath();
|
||||||
String host = GetHost();
|
String host = GetHost();
|
||||||
|
|
||||||
|
if (path.IsEmpty())
|
||||||
m_Context = redisConnect(host.CStr(), GetPort());
|
m_Context = redisConnect(host.CStr(), GetPort());
|
||||||
|
else
|
||||||
|
m_Context = redisConnectUnix(path.CStr());
|
||||||
|
|
||||||
String password = GetPassword();
|
String password = GetPassword();
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ class RedisWriter : ConfigObject
|
|||||||
[config] int port {
|
[config] int port {
|
||||||
default {{{ return 6379; }}}
|
default {{{ return 6379; }}}
|
||||||
};
|
};
|
||||||
|
[config] String path;
|
||||||
[config] String password;
|
[config] String password;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user