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 }} ```