Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
14 / 14 |
|
100.00% |
14 / 14 |
CRAP | |
100.00% |
1 / 1 |
LBHealth | |
100.00% |
14 / 14 |
|
100.00% |
14 / 14 |
14 | |
100.00% |
1 / 1 |
getProtocol | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setProtocol | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getPort | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setPort | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getPath | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setPath | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getCheckInterval | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setCheckInterval | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getResponseTimeout | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setResponseTimeout | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getUnhealthyThreshold | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setUnhealthyThreshold | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getHealthyThreshold | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setHealthyThreshold | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Vultr\VultrPhp\Services\LoadBalancers; |
6 | |
7 | use Vultr\VultrPhp\Util\Model; |
8 | |
9 | /** |
10 | * Holds load balancer health information. |
11 | */ |
12 | class LBHealth extends Model |
13 | { |
14 | protected string $protocol; |
15 | protected int $port; |
16 | protected string $path; |
17 | protected int $checkInterval; |
18 | protected int $responseTimeout; |
19 | protected int $unhealthyThreshold; |
20 | protected int $healthyThreshold; |
21 | |
22 | public function getProtocol() : string |
23 | { |
24 | return $this->protocol; |
25 | } |
26 | |
27 | public function setProtocol(string $protocol) : void |
28 | { |
29 | $this->protocol = $protocol; |
30 | } |
31 | |
32 | public function getPort() : int |
33 | { |
34 | return $this->port; |
35 | } |
36 | |
37 | public function setPort(int $port) : void |
38 | { |
39 | $this->port = $port; |
40 | } |
41 | |
42 | public function getPath() : string |
43 | { |
44 | return $this->path; |
45 | } |
46 | |
47 | public function setPath(string $path) : void |
48 | { |
49 | $this->path = $path; |
50 | } |
51 | |
52 | public function getCheckInterval() : int |
53 | { |
54 | return $this->checkInterval; |
55 | } |
56 | |
57 | public function setCheckInterval(int $check_interval) : void |
58 | { |
59 | $this->checkInterval = $check_interval; |
60 | } |
61 | |
62 | public function getResponseTimeout() : int |
63 | { |
64 | return $this->responseTimeout; |
65 | } |
66 | |
67 | public function setResponseTimeout(int $response_timeout) : void |
68 | { |
69 | $this->responseTimeout = $response_timeout; |
70 | } |
71 | |
72 | public function getUnhealthyThreshold() : int |
73 | { |
74 | return $this->unhealthyThreshold; |
75 | } |
76 | |
77 | public function setUnhealthyThreshold(int $unhealthy_threshold) : void |
78 | { |
79 | $this->unhealthyThreshold = $unhealthy_threshold; |
80 | } |
81 | |
82 | public function getHealthyThreshold() : int |
83 | { |
84 | return $this->healthyThreshold; |
85 | } |
86 | |
87 | public function setHealthyThreshold(int $healthy_threshold) : void |
88 | { |
89 | $this->healthyThreshold = $healthy_threshold; |
90 | } |
91 | } |