From f797d909cf2ee0f94d528c46d169ca33df226ccc Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Wed, 6 Aug 2025 17:30:19 +0200 Subject: [PATCH] Update README_GO.md --- README_GO.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README_GO.md b/README_GO.md index a84b3f3..fcfa995 100644 --- a/README_GO.md +++ b/README_GO.md @@ -12,8 +12,6 @@ export HAPROXY_TEMPLATE="./haproxy.tmpl" # HaProxy Template ``` -{{- range .backends }} - backend {{ .Name }} mode {{ .Mode }} balance {{ .Balance }} @@ -21,12 +19,16 @@ backend {{ .Name }} cookie {{ .CookieName }} {{ .CookieFlags }} {{- end }} + {{- if .HealthCheck }} + option httpchk GET {{ .HealthCheck }} + http-check expect status 200 + {{- end }} + {{- $backend := . }} {{- range .Servers }} server {{ .Name }} {{ .Address }}:{{ .Port }}{{ if $backend.HealthCheck }} check{{ end }}{{ if $backend.CookieName }} cookie {{ .Cookie }}{{ end }}{{ if $backend.ServerOptions }} {{ $backend.ServerOptions }}{{ end }} {{- end }} -{{- end }} ```