mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
We need a Livestatus factory
This commit is contained in:
parent
e57b75b354
commit
5d3fbd1cdf
@ -8,6 +8,7 @@ use Zend_Config;
|
|||||||
use Icinga\Util\ConfigAwareFactory;
|
use Icinga\Util\ConfigAwareFactory;
|
||||||
use Icinga\Exception\ConfigurationError;
|
use Icinga\Exception\ConfigurationError;
|
||||||
use Icinga\Data\Db\Connection as DbConnection;
|
use Icinga\Data\Db\Connection as DbConnection;
|
||||||
|
use Icinga\Protocol\Livestatus\Connection as LivestatusConnection;
|
||||||
use Icinga\Protocol\Statusdat\Reader as StatusdatReader;
|
use Icinga\Protocol\Statusdat\Reader as StatusdatReader;
|
||||||
|
|
||||||
class ResourceFactory implements ConfigAwareFactory
|
class ResourceFactory implements ConfigAwareFactory
|
||||||
@ -39,6 +40,9 @@ class ResourceFactory implements ConfigAwareFactory
|
|||||||
case 'statusdat':
|
case 'statusdat':
|
||||||
$resource = new StatusdatReader($config);
|
$resource = new StatusdatReader($config);
|
||||||
break;
|
break;
|
||||||
|
case 'livestatus':
|
||||||
|
$resource = new LivestatusConnection($config->socket);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new ConfigurationError('Unsupported resource type "' . $config->type . '"');
|
throw new ConfigurationError('Unsupported resource type "' . $config->type . '"');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user