This commit is contained in:
parent
c88d0e2739
commit
4c65ddfb9e
1 changed files with 18 additions and 0 deletions
18
README_GO.md
18
README_GO.md
|
@ -8,3 +8,21 @@ export HAPROXY_TEMPLATE="./haproxy.tmpl"
|
|||
|
||||
./haproxy-generator > /etc/haproxy/haproxy.cfg && sudo systemctl restart haproxy
|
||||
```
|
||||
|
||||
# HaProxy Template
|
||||
|
||||
```
|
||||
{{- range .backends }}
|
||||
|
||||
backend {{ .Name }}
|
||||
mode tcp
|
||||
balance leastconn
|
||||
cookie {{ .Name }} insert indirect nocache
|
||||
|
||||
{{- range .Servers }}
|
||||
server {{ .Name }} {{ .Address }}:{{ .Port }} check cookie {{ .Cookie }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
```
|
Loading…
Add table
Reference in a new issue