-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathAdapter.php
More file actions
62 lines (51 loc) · 1.26 KB
/
Adapter.php
File metadata and controls
62 lines (51 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
declare(strict_types=1);
namespace Prometheus\Storage;
use Prometheus\Exception\StorageException;
use Prometheus\MetricFamilySamples;
interface Adapter
{
const COMMAND_INCREMENT_INTEGER = 1;
const COMMAND_INCREMENT_FLOAT = 2;
const COMMAND_SET = 3;
/**
* @return MetricFamilySamples[]
*/
public function collect(): array;
/**
* @param mixed[] $data
* @return void
*/
public function updateSummary(array $data): void;
/**
* @param mixed[] $data
* @return void
*/
public function updateHistogram(array $data): void;
/**
* @param mixed[] $data
* @return void
*/
public function updateGauge(array $data): void;
/**
* @param mixed[] $data
* @return void
*/
public function updateCounter(array $data): void;
/**
* Removes all previously stored metrics from underlying storage
*
* @throws StorageException
* @return void
*/
public function wipeStorage(): void;
/**
* Removes a specific previously stored metric from underlying storage
*
* @param string $type
* @param string $key
* @throws StorageException
* @return void
*/
public function wipeKey(string $type, string $key): void;
}