| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Prometheus\Storage; |
| 6 |
|
| 7 |
use Prometheus\Exception\StorageException; |
| 8 |
use Prometheus\MetricFamilySamples; |
| 9 |
|
| 10 |
interface Adapter |
| 11 |
{ |
| 12 |
const COMMAND_INCREMENT_INTEGER = 1; |
| 13 |
const COMMAND_INCREMENT_FLOAT = 2; |
| 14 |
const COMMAND_SET = 3; |
| 15 |
|
| 16 |
/** |
| 17 |
* @return MetricFamilySamples[] |
| 18 |
*/ |
| 19 |
public function collect(): array; |
| 20 |
|
| 21 |
/** |
| 22 |
* @param mixed[] $data |
| 23 |
* @return void |
| 24 |
*/ |
| 25 |
public function updateHistogram(array $data): void; |
| 26 |
|
| 27 |
/** |
| 28 |
* @param mixed[] $data |
| 29 |
* @return void |
| 30 |
*/ |
| 31 |
public function updateGauge(array $data): void; |
| 32 |
|
| 33 |
/** |
| 34 |
* @param mixed[] $data |
| 35 |
* @return void |
| 36 |
*/ |
| 37 |
public function updateCounter(array $data): void; |
| 38 |
|
| 39 |
/** |
| 40 |
* Removes all previously stored metrics from underlying storage |
| 41 |
* |
| 42 |
* @throws StorageException |
| 43 |
* @return void |
| 44 |
*/ |
| 45 |
public function wipeStorage(): void; |
| 46 |
} |
| 47 |
|