Support gRPC healthcheck
This commit is contained in:
parent
df99a9fb57
commit
033fccccc7
14 changed files with 374 additions and 107 deletions
|
@ -360,8 +360,19 @@ func buildHealthCheckOptions(ctx context.Context, lb healthcheck.Balancer, backe
|
|||
followRedirects = *hc.FollowRedirects
|
||||
}
|
||||
|
||||
mode := healthcheck.HTTPMode
|
||||
switch hc.Mode {
|
||||
case "":
|
||||
mode = healthcheck.HTTPMode
|
||||
case healthcheck.GRPCMode, healthcheck.HTTPMode:
|
||||
mode = hc.Mode
|
||||
default:
|
||||
logger.Errorf("Illegal health check mode for backend '%s'", backend)
|
||||
}
|
||||
|
||||
return &healthcheck.Options{
|
||||
Scheme: hc.Scheme,
|
||||
Mode: mode,
|
||||
Path: hc.Path,
|
||||
Method: hc.Method,
|
||||
Port: hc.Port,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue