1
0
Fork 0

feat(provider): Add Eureka Provider

This commit is contained in:
Julien Salleyron 2016-08-31 22:43:05 +02:00
parent 56c6174d61
commit 2af6cc4d1b
9 changed files with 411 additions and 20 deletions

15
templates/eureka.tmpl Normal file
View file

@ -0,0 +1,15 @@
[backends]{{range .Applications}}
{{ $app := .}}
{{range .Instances}}
[backends.backend{{$app.Name}}.servers.server-{{ getInstanceID . }}]
url = "{{ getProtocol . }}://{{ .IpAddr }}:{{ getPort . }}"
weight = {{ getWeight . }}
{{end}}{{end}}
[frontends]{{range .Applications}}
[frontends.frontend{{.Name}}]
backend = "backend{{.Name}}"
entryPoints = ["http"]
[frontends.frontend{{.Name }}.routes.route-host{{.Name}}]
rule = "Host:http://{{ .Name | tolower }}"
{{end}}