1 | <?php |
||
10 | class ServersArePingable implements Check |
||
11 | { |
||
12 | protected const DEFAULT_TIMEOUT = 5; |
||
13 | |||
14 | /** @var Collection */ |
||
15 | protected $notReachableServers; |
||
16 | |||
17 | public function __construct() |
||
21 | |||
22 | /** |
||
23 | * The name of the check. |
||
24 | * |
||
25 | * @param array $config |
||
26 | * @return string |
||
27 | */ |
||
28 | public function name(array $config): string |
||
32 | |||
33 | /** |
||
34 | * Perform the actual verification of this check. |
||
35 | * |
||
36 | * @param array $config |
||
37 | * @return bool |
||
38 | * @throws InvalidConfigurationException |
||
39 | */ |
||
40 | public function check(array $config): bool |
||
63 | |||
64 | /** |
||
65 | * The error message to display in case the check does not pass. |
||
66 | * |
||
67 | * @param array $config |
||
68 | * @return string |
||
69 | */ |
||
70 | public function message(array $config): string |
||
80 | |||
81 | /** |
||
82 | * Parses an array of servers which can be given in different formats. |
||
83 | * Unifies the format for the resulting collection. |
||
84 | * |
||
85 | * @param array $servers |
||
86 | * @return Collection |
||
87 | * @throws InvalidConfigurationException |
||
88 | */ |
||
89 | private function parseConfiguredServers(array $servers): Collection |
||
116 | } |
||
117 |