2016-02-08 20:57:32 +00:00
|
|
|
[backends]{{range $backendName, $backend := .Backends}}
|
2017-02-03 16:47:48 +00:00
|
|
|
{{if $backend.CircuitBreaker}}
|
|
|
|
[backends."{{$backendName}}".circuitbreaker]
|
|
|
|
expression = "{{$backend.CircuitBreaker.Expression}}"
|
|
|
|
{{end}}
|
2017-01-25 13:11:00 +00:00
|
|
|
[backends."{{$backendName}}".loadbalancer]
|
|
|
|
method = "{{$backend.LoadBalancer.Method}}"
|
|
|
|
{{if $backend.LoadBalancer.Sticky}}
|
|
|
|
sticky = true
|
|
|
|
{{end}}
|
2016-02-08 20:57:32 +00:00
|
|
|
{{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}}"
|
2016-08-02 23:48:53 +00:00
|
|
|
priority = {{$frontend.Priority}}
|
2016-05-10 11:43:24 +00:00
|
|
|
passHostHeader = {{$frontend.PassHostHeader}}
|
2016-02-08 20:57:32 +00:00
|
|
|
{{range $routeName, $route := $frontend.Routes}}
|
|
|
|
[frontends."{{$frontendName}}".routes."{{$routeName}}"]
|
2016-04-20 11:26:51 +00:00
|
|
|
rule = "{{$route.Rule}}"
|
2016-02-08 20:57:32 +00:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|