From e16e5c4fec65d82a8221f3b4bd62718e0e85446c Mon Sep 17 00:00:00 2001 From: m1093782566 Date: Thu, 25 Aug 2016 11:53:42 +0800 Subject: [PATCH] fix naming error and sentence breaking in pkg/proxy/healthcheck Change-Id: Iee36ff4e497052f473f95f8f0a92421d85e3c416 --- pkg/proxy/healthcheck/api.go | 6 +++--- pkg/proxy/healthcheck/healthcheck.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/proxy/healthcheck/api.go b/pkg/proxy/healthcheck/api.go index bec40dae52c..200ea25f9d6 100644 --- a/pkg/proxy/healthcheck/api.go +++ b/pkg/proxy/healthcheck/api.go @@ -33,12 +33,12 @@ func UpdateEndpoints(serviceName types.NamespacedName, endpointUids sets.String) healthchecker.mutationRequestChannel <- req } -func updateServiceListener(serviceName types.NamespacedName, listenPort int, addOrDelete bool) bool { +func updateServiceListener(serviceName types.NamespacedName, listenPort int, add bool) bool { responseChannel := make(chan bool) req := &proxyListenerRequest{ serviceName: serviceName, listenPort: uint16(listenPort), - add: addOrDelete, + add: add, responseChannel: responseChannel, } healthchecker.listenerRequestChannel <- req @@ -50,7 +50,7 @@ func AddServiceListener(serviceName types.NamespacedName, listenPort int) bool { return updateServiceListener(serviceName, listenPort, true) } -// DeleteServiceListener Request addition of a listener for a service's health check +// DeleteServiceListener Request deletion of a listener for a service's health check func DeleteServiceListener(serviceName types.NamespacedName, listenPort int) bool { return updateServiceListener(serviceName, listenPort, false) } diff --git a/pkg/proxy/healthcheck/healthcheck.go b/pkg/proxy/healthcheck/healthcheck.go index afce7547a75..47313c5dca7 100644 --- a/pkg/proxy/healthcheck/healthcheck.go +++ b/pkg/proxy/healthcheck/healthcheck.go @@ -68,7 +68,7 @@ func (h *proxyHC) handleHealthCheckRequest(rw http.ResponseWriter, serviceName s s, ok := h.serviceEndpointsMap.Get(serviceName) if !ok { glog.V(4).Infof("Service %s not found or has no local endpoints", serviceName) - sendHealthCheckResponse(rw, http.StatusServiceUnavailable, "No Service Endpoints Not Found") + sendHealthCheckResponse(rw, http.StatusServiceUnavailable, "No Service Endpoints Found") return } numEndpoints := len(*s.(*serviceEndpointsList).endpoints)