Fix documentation

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-03-11 13:20:41 -03:00
parent 20a89480f0
commit 870b89c72b
No known key found for this signature in database
GPG key ID: 786136016A8BA02A
2 changed files with 4 additions and 4 deletions

View file

@ -136,12 +136,12 @@ func (cm *Controller) IncReloadErrorCount() {
cm.reloadOperationErrors.With(cm.constLabels).Inc()
}
// OnStartedLeading indicates the pod is not the current leader
// OnStartedLeading indicates the pod was elected as the leader
func (cm *Controller) OnStartedLeading(electionID string) {
cm.leaderElection.WithLabelValues(electionID).Set(0)
}
// OnStoppedLeading indicates the pod is not the current leader
// OnStoppedLeading indicates the pod stopped being the leader
func (cm *Controller) OnStoppedLeading(electionID string) {
cm.leaderElection.WithLabelValues(electionID).Set(1.0)
}

View file

@ -151,12 +151,12 @@ func (c *collector) SetHosts(hosts sets.String) {
c.socket.SetHosts(hosts)
}
// OnStartedLeading indicates the pod is not the current leader
// OnStartedLeading indicates the pod was elected as the leader
func (c *collector) OnStartedLeading(electionID string) {
c.ingressController.OnStartedLeading(electionID)
}
// OnStoppedLeading indicates the pod is not the current leader
// OnStoppedLeading indicates the pod stopped being the leader
func (c *collector) OnStoppedLeading(electionID string) {
c.ingressController.OnStoppedLeading(electionID)
}