commit
b4c5af1b85
4 changed files with 4 additions and 4 deletions
|
@ -46,7 +46,7 @@ NGINX master process died (%v): %v
|
|||
}
|
||||
|
||||
// WaitUntilPortIsAvailable waits until there is no NGINX master or worker
|
||||
// process/es listentning in a particular port.
|
||||
// process/es listening in a particular port.
|
||||
func WaitUntilPortIsAvailable(port int) {
|
||||
// we wait until the workers are killed
|
||||
for {
|
||||
|
|
|
@ -177,7 +177,7 @@ func (cm *Controller) SetSSLExpireTime(servers []*ingress.Server) {
|
|||
}
|
||||
}
|
||||
|
||||
// RemoveMetrics removes metrics for hostames not available anymore
|
||||
// RemoveMetrics removes metrics for hostnames not available anymore
|
||||
func (cm *Controller) RemoveMetrics(hosts []string, registry prometheus.Gatherer) {
|
||||
mfs, err := registry.Gather()
|
||||
if err != nil {
|
||||
|
|
|
@ -97,7 +97,7 @@ var (
|
|||
)
|
||||
|
||||
// NewSocketCollector creates a new SocketCollector instance using
|
||||
// the ingresss watch namespace and class used by the controller
|
||||
// the ingress watch namespace and class used by the controller
|
||||
func NewSocketCollector(pod, namespace, class string) (*SocketCollector, error) {
|
||||
socket := "/tmp/prometheus-nginx.socket"
|
||||
listener, err := net.Listen("unix", socket)
|
||||
|
|
|
@ -48,7 +48,7 @@ func GatherAndCompare(c prometheus.Collector, expected string, metricNames []str
|
|||
}
|
||||
|
||||
if !reflect.DeepEqual(metrics, normalizeMetricFamilies(expectedMetrics)) {
|
||||
// Encode the gathered output to the readbale text format for comparison.
|
||||
// Encode the gathered output to the readable text format for comparison.
|
||||
var buf1 bytes.Buffer
|
||||
enc := expfmt.NewEncoder(&buf1, expfmt.FmtText)
|
||||
for _, mf := range metrics {
|
||||
|
|
Loading…
Reference in a new issue