MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / doHealthCheck

Method doHealthCheck

internal/nodes/http_request_health_check.go:12–35  ·  view source on GitHub ↗

健康检查

(key string, isHealthCheck *bool)

Source from the content-addressed store, hash-verified

10
11// 健康检查
12func (this *HTTPRequest) doHealthCheck(key string, isHealthCheck *bool) (stop bool) {
13 this.tags = append(this.tags, "healthCheck")
14
15 this.RawReq.Header.Del(serverconfigs.HealthCheckHeaderName)
16
17 data, err := nodeutils.Base64DecodeMap(key)
18 if err != nil {
19 remotelogs.Error("HTTP_REQUEST_HEALTH_CHECK", "decode key failed: "+err.Error())
20 return
21 }
22 *isHealthCheck = true
23
24 this.web.StatRef = nil
25
26 if !data.GetBool("accessLogIsOn") {
27 this.disableLog = true
28 }
29
30 if data.GetBool("onlyBasicRequest") {
31 return true
32 }
33
34 return
35}

Callers 1

DoMethod · 0.95

Calls 2

ErrorFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected