feat(provider): Add Eureka Provider
This commit is contained in:
parent
56c6174d61
commit
2af6cc4d1b
9 changed files with 411 additions and 20 deletions
15
templates/eureka.tmpl
Normal file
15
templates/eureka.tmpl
Normal 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}}
|
Loading…
Add table
Add a link
Reference in a new issue