Cleaner Ingress processing code

This commit is contained in:
Manuel de Brito Fontes 2016-03-16 15:57:36 -03:00
parent 6cb0e41737
commit 5ed462db09
4 changed files with 74 additions and 67 deletions

View file

@ -57,7 +57,7 @@ func (ngx *NginxManager) loadTemplate() {
ngx.template = tmpl
}
func (ngx *NginxManager) writeCfg(cfg *nginxConfiguration, upstreams []Upstream, servers []Server, servicesL4 []Service) (bool, error) {
func (ngx *NginxManager) writeCfg(cfg *nginxConfiguration, upstreams []*Upstream, servers []*Server, servicesL4 []Service) (bool, error) {
fromMap := structs.Map(cfg)
toMap := structs.Map(ngx.defCfg)
curNginxCfg := merge(toMap, fromMap)