Replace standard json encoding with jsoniter

This commit is contained in:
Manuel de Brito Fontes 2018-09-22 14:25:01 -03:00
parent 0fd87a7e56
commit 91ae204f6c
5 changed files with 25 additions and 7 deletions

View file

@ -131,7 +131,13 @@ func (n *NGINXController) syncIngress(interface{}) error {
upstreams, servers := n.getBackendServers(ings)
var passUpstreams []*ingress.SSLPassthroughBackend
hosts := sets.NewString()
for _, server := range servers {
if !hosts.Has(server.Hostname) {
hosts.Insert(server.Hostname)
}
if !server.SSLPassthrough {
continue
}
@ -184,6 +190,8 @@ func (n *NGINXController) syncIngress(interface{}) error {
return err
}
n.metricCollector.SetHosts(hosts)
glog.Infof("Backend successfully reloaded.")
n.metricCollector.ConfigSuccess(hash, true)
n.metricCollector.IncReloadCount()