Implement HealthzChecker interface. Add flag to allow profiling

This commit is contained in:
Manuel de Brito Fontes 2016-03-22 13:51:50 -03:00
parent d9934ec4db
commit f5892e06fe
10 changed files with 233 additions and 58 deletions

View file

@ -37,12 +37,12 @@ var funcMap = template.FuncMap{
},
}
func (ngx *NginxManager) loadTemplate() {
func (ngx *Manager) loadTemplate() {
tmpl, _ := template.New("nginx.tmpl").Funcs(funcMap).ParseFiles("./nginx.tmpl")
ngx.template = tmpl
}
func (ngx *NginxManager) writeCfg(cfg *nginxConfiguration, ingressCfg IngressConfig) (bool, error) {
func (ngx *Manager) writeCfg(cfg *nginxConfiguration, ingressCfg IngressConfig) (bool, error) {
fromMap := structs.Map(cfg)
toMap := structs.Map(ngx.defCfg)
curNginxCfg := merge(toMap, fromMap)