23 lines
805 B
Cheetah
23 lines
805 B
Cheetah
[backends]{{range $backendName, $backend := .Backends}}
|
|
[backends."{{$backendName}}".loadbalancer]
|
|
method = "{{$backend.LoadBalancer.Method}}"
|
|
{{if $backend.LoadBalancer.Sticky}}
|
|
sticky = true
|
|
{{end}}
|
|
{{range $serverName, $server := $backend.Servers}}
|
|
[backends."{{$backendName}}".servers."{{$serverName}}"]
|
|
url = "{{$server.URL}}"
|
|
weight = {{$server.Weight}}
|
|
{{end}}
|
|
{{end}}
|
|
|
|
[frontends]{{range $frontendName, $frontend := .Frontends}}
|
|
[frontends."{{$frontendName}}"]
|
|
backend = "{{$frontend.Backend}}"
|
|
priority = {{$frontend.Priority}}
|
|
passHostHeader = {{$frontend.PassHostHeader}}
|
|
{{range $routeName, $route := $frontend.Routes}}
|
|
[frontends."{{$frontendName}}".routes."{{$routeName}}"]
|
|
rule = "{{$route.Rule}}"
|
|
{{end}}
|
|
{{end}}
|