mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
More updates
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB\Database;
|
||||
|
||||
/**
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
class Exception extends \InfluxDB\Exception
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace InfluxDB\Database;
|
||||
|
||||
/**
|
||||
* Class RetentionPolicy
|
||||
*
|
||||
* @package InfluxDB\Database
|
||||
* @author Stephen "TheCodeAssassin" Hoogendijk
|
||||
*/
|
||||
class RetentionPolicy
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $duration;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $replication;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $default;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param string $duration
|
||||
* @param int $replication
|
||||
* @param bool $default
|
||||
*
|
||||
* @todo validate duration, replication
|
||||
*/
|
||||
public function __construct($name, $duration = '1d', $replication = 1, $default = false)
|
||||
{
|
||||
$this->name = (string) $name;
|
||||
$this->duration = $duration;
|
||||
$this->replication = (int) $replication;
|
||||
$this->default = (bool) $default;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user