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\Exception\ConfigurationError;
|
||||
use Icinga\Data\Db\Connection as DbConnection;
|
||||
use Icinga\Protocol\Livestatus\Connection as LivestatusConnection;
|
||||
use Icinga\Protocol\Statusdat\Reader as StatusdatReader;
|
||||
|
||||
class ResourceFactory implements ConfigAwareFactory
|
||||
|
@ -39,6 +40,9 @@ class ResourceFactory implements ConfigAwareFactory
|
|||
case 'statusdat':
|
||||
$resource = new StatusdatReader($config);
|
||||
break;
|
||||
case 'livestatus':
|
||||
$resource = new LivestatusConnection($config->socket);
|
||||
break;
|
||||
default:
|
||||
throw new ConfigurationError('Unsupported resource type "' . $config->type . '"');
|
||||
|
||||
|
|
Loading…
Reference in New Issue