forked from docker-php/docker-php-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHealthConfig.php
More file actions
173 lines (165 loc) · 4.79 KB
/
Copy pathHealthConfig.php
File metadata and controls
173 lines (165 loc) · 4.79 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<?php
namespace Docker\API\Model;
class HealthConfig extends \ArrayObject
{
/**
* @var array
*/
protected $initialized = [];
public function isInitialized($property) : bool
{
return array_key_exists($property, $this->initialized);
}
/**
* The test to perform. Possible values are:
- `[]` inherit healthcheck from image or parent image
- `["NONE"]` disable healthcheck
- `["CMD", args...]` exec arguments directly
- `["CMD-SHELL", command]` run command with system's default shell
*
* @var string[]|null
*/
protected $test;
/**
* The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
*
* @var int|null
*/
protected $interval;
/**
* The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
*
* @var int|null
*/
protected $timeout;
/**
* The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit.
*
* @var int|null
*/
protected $retries;
/**
* Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
*
* @var int|null
*/
protected $startPeriod;
/**
* The test to perform. Possible values are:
- `[]` inherit healthcheck from image or parent image
- `["NONE"]` disable healthcheck
- `["CMD", args...]` exec arguments directly
- `["CMD-SHELL", command]` run command with system's default shell
*
* @return string[]|null
*/
public function getTest() : ?array
{
return $this->test;
}
/**
* The test to perform. Possible values are:
- `[]` inherit healthcheck from image or parent image
- `["NONE"]` disable healthcheck
- `["CMD", args...]` exec arguments directly
- `["CMD-SHELL", command]` run command with system's default shell
*
* @param string[]|null $test
*
* @return self
*/
public function setTest(?array $test) : self
{
$this->initialized['test'] = true;
$this->test = $test;
return $this;
}
/**
* The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
*
* @return int|null
*/
public function getInterval() : ?int
{
return $this->interval;
}
/**
* The time to wait between checks in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
*
* @param int|null $interval
*
* @return self
*/
public function setInterval(?int $interval) : self
{
$this->initialized['interval'] = true;
$this->interval = $interval;
return $this;
}
/**
* The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
*
* @return int|null
*/
public function getTimeout() : ?int
{
return $this->timeout;
}
/**
* The time to wait before considering the check to have hung. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
*
* @param int|null $timeout
*
* @return self
*/
public function setTimeout(?int $timeout) : self
{
$this->initialized['timeout'] = true;
$this->timeout = $timeout;
return $this;
}
/**
* The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit.
*
* @return int|null
*/
public function getRetries() : ?int
{
return $this->retries;
}
/**
* The number of consecutive failures needed to consider a container as unhealthy. 0 means inherit.
*
* @param int|null $retries
*
* @return self
*/
public function setRetries(?int $retries) : self
{
$this->initialized['retries'] = true;
$this->retries = $retries;
return $this;
}
/**
* Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
*
* @return int|null
*/
public function getStartPeriod() : ?int
{
return $this->startPeriod;
}
/**
* Start period for the container to initialize before starting health-retries countdown in nanoseconds. It should be 0 or at least 1000000 (1 ms). 0 means inherit.
*
* @param int|null $startPeriod
*
* @return self
*/
public function setStartPeriod(?int $startPeriod) : self
{
$this->initialized['startPeriod'] = true;
$this->startPeriod = $startPeriod;
return $this;
}
}