File tree 3 files changed +24
-4
lines changed
3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,10 @@ func TestProcesses(t *testing.T) {
119
119
"health_check": {
120
120
"type": "http",
121
121
"data": {
122
- "timeout": 60
122
+ "timeout": 60,
123
+ "invocation_timeout": 5,
124
+ "interval": 10,
125
+ "endpoint": "/health"
123
126
}
124
127
}
125
128
}` ,
@@ -129,7 +132,10 @@ func TestProcesses(t *testing.T) {
129
132
r := resource .NewProcessUpdate ().
130
133
WithCommand ("rackup" ).
131
134
WithHealthCheckType ("http" ).
132
- WithHealthCheckTimeout (60 )
135
+ WithHealthCheckTimeout (60 ).
136
+ WithHealthCheckInterval (10 ).
137
+ WithHealthCheckInvocationTimeout (5 ).
138
+ WithHealthCheckEndpoint ("/health" )
133
139
return c .Processes .Update (context .Background (), "ec4ff362-60c5-47a0-8246-2a134537c606" , r )
134
140
},
135
141
},
Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ type ProcessData struct {
91
91
// The timeout in seconds for individual health check requests for http and port health checks
92
92
InvocationTimeout * int `json:"invocation_timeout,omitempty"`
93
93
94
+ // The interval in seconds between health check requests
95
+ Interval * int `json:"interval,omitempty"`
96
+
94
97
// The endpoint called to determine if the app is healthy; this key is only present for http health check
95
98
Endpoint * string `json:"endpoint,omitempty"`
96
99
}
@@ -164,6 +167,14 @@ func (p *ProcessUpdate) WithHealthCheckInvocationTimeout(timeout int) *ProcessUp
164
167
return p
165
168
}
166
169
170
+ func (p * ProcessUpdate ) WithHealthCheckInterval (interval int ) * ProcessUpdate {
171
+ if p .HealthCheck == nil {
172
+ p .HealthCheck = & ProcessHealthCheck {}
173
+ }
174
+ p .HealthCheck .Data .Interval = & interval
175
+ return p
176
+ }
177
+
167
178
func (p * ProcessUpdate ) WithHealthCheckEndpoint (endpoint string ) * ProcessUpdate {
168
179
if p .HealthCheck == nil {
169
180
p .HealthCheck = & ProcessHealthCheck {}
Original file line number Diff line number Diff line change 7
7
"disk_in_mb" : 1024 ,
8
8
"log_rate_limit_in_bytes_per_second" : 1024 ,
9
9
"health_check" : {
10
- "type" : " port " ,
10
+ "type" : " http " ,
11
11
"data" : {
12
- "timeout" : null
12
+ "timeout" : 60 ,
13
+ "invocation_timeout" : 5 ,
14
+ "interval" : 10 ,
15
+ "endpoint" : " /health"
13
16
}
14
17
},
15
18
"relationships" : {
You can’t perform that action at this time.
0 commit comments