Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e16e5c4f
Commit
e16e5c4f
authored
Aug 25, 2016
by
m1093782566
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix naming error and sentence breaking in pkg/proxy/healthcheck
Change-Id: Iee36ff4e497052f473f95f8f0a92421d85e3c416
parent
e5fbea62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
api.go
pkg/proxy/healthcheck/api.go
+3
-3
healthcheck.go
pkg/proxy/healthcheck/healthcheck.go
+1
-1
No files found.
pkg/proxy/healthcheck/api.go
View file @
e16e5c4f
...
...
@@ -33,12 +33,12 @@ func UpdateEndpoints(serviceName types.NamespacedName, endpointUids sets.String)
healthchecker
.
mutationRequestChannel
<-
req
}
func
updateServiceListener
(
serviceName
types
.
NamespacedName
,
listenPort
int
,
add
OrDelete
bool
)
bool
{
func
updateServiceListener
(
serviceName
types
.
NamespacedName
,
listenPort
int
,
add
bool
)
bool
{
responseChannel
:=
make
(
chan
bool
)
req
:=
&
proxyListenerRequest
{
serviceName
:
serviceName
,
listenPort
:
uint16
(
listenPort
),
add
:
add
OrDelete
,
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
addi
tion of a listener for a service's health check
// DeleteServiceListener Request
dele
tion of a listener for a service's health check
func
DeleteServiceListener
(
serviceName
types
.
NamespacedName
,
listenPort
int
)
bool
{
return
updateServiceListener
(
serviceName
,
listenPort
,
false
)
}
...
...
pkg/proxy/healthcheck/healthcheck.go
View file @
e16e5c4f
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment