1
0
Fork 0

Move docker provider to its own package 👼

Makes it simpler to manage :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2017-04-15 15:49:53 +02:00
parent dc01094863
commit 3f293ee25b
17 changed files with 163 additions and 161 deletions

View file

@ -79,7 +79,7 @@ func (provider *Rancher) getFrontendRule(service rancherData) string {
func (provider *Rancher) getFrontendName(service rancherData) string {
// Replace '.' with '-' in quoted keys because of this issue https://github.com/BurntSushi/toml/issues/78
return normalize(provider.getFrontendRule(service))
return Normalize(provider.getFrontendRule(service))
}
// Backend Labels
@ -122,9 +122,9 @@ func (provider *Rancher) getSticky(service rancherData) string {
func (provider *Rancher) getBackend(service rancherData) string {
if label, err := getServiceLabel(service, "traefik.backend"); err == nil {
return normalize(label)
return Normalize(label)
}
return normalize(service.Name)
return Normalize(service.Name)
}
// Generall Application Stuff
@ -436,7 +436,7 @@ func (provider *Rancher) loadRancherConfig(services []rancherData) *types.Config
provider.Domain,
}
configuration, err := provider.getConfiguration("templates/rancher.tmpl", RancherFuncMap, templateObjects)
configuration, err := provider.GetConfiguration("templates/rancher.tmpl", RancherFuncMap, templateObjects)
if err != nil {
log.Error(err)
}