This commit is contained in:
parent
f0b618c712
commit
be43cb93b4
1 changed files with 8 additions and 4 deletions
12
README_GO.md
12
README_GO.md
|
@ -15,16 +15,20 @@ export HAPROXY_TEMPLATE="./haproxy.tmpl"
|
||||||
{{- range .backends }}
|
{{- range .backends }}
|
||||||
|
|
||||||
backend {{ .Name }}
|
backend {{ .Name }}
|
||||||
mode tcp
|
mode {{ .Mode }}
|
||||||
balance leastconn
|
balance {{ .Balance }}
|
||||||
cookie {{ .Name }} insert indirect nocache
|
{{- if .CookieName }}
|
||||||
|
cookie {{ .CookieName }} {{ .CookieFlags }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- range .Servers }}
|
{{- range .Servers }}
|
||||||
server {{ .Name }} {{ .Address }}:{{ .Port }} check cookie {{ .Cookie }}
|
server {{ .Name }} {{ .Address }}:{{ .Port }}{{ if $.HealthCheck }} check{{ end }}{{ if $.CookieName }} cookie {{ .Cookie }}{{ end }} {{ $.ServerOptions }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue