1 | <?php |
||
19 | class Redis extends AbstractStorage { |
||
20 | |||
21 | /** |
||
22 | * @var \Redis |
||
23 | * The Redis connection. |
||
24 | */ |
||
25 | protected $redis; |
||
26 | |||
27 | /** |
||
28 | * Redis constructor. |
||
29 | * |
||
30 | * @param string $host |
||
31 | * the connection host |
||
32 | * @param null|string $password |
||
33 | * the password for authentication, null to ignore |
||
34 | * @param int $port |
||
35 | * the connection port, default 6379 |
||
36 | * @param string $prefix |
||
37 | * the global key prefix to use, default 'PHPProm:' |
||
38 | * @param null|string $dbIndex |
||
39 | * the Redis DB index to use, null to ignore |
||
40 | */ |
||
41 | public function __construct($host, $password = null, $port = 6379, $prefix = 'PHPProm:', $dbIndex = null) { |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function storeMeasurement($metric, $key, $value) { |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function incrementMeasurement($metric, $key) { |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function getMeasurements($metric, array $keys, $defaultValue = 'Nan') { |
||
81 | } |
||
82 |