@@ -117,13 +117,6 @@ func (info *BaseEndpointInfo) Port() (int, error) {
117
117
return proxyutil .PortPart (info .Endpoint )
118
118
}
119
119
120
- // Equal is part of proxy.Endpoint interface.
121
- func (info * BaseEndpointInfo ) Equal (other Endpoint ) bool {
122
- return info .String () == other .String () &&
123
- info .GetIsLocal () == other .GetIsLocal () &&
124
- info .IsReady () == other .IsReady ()
125
- }
126
-
127
120
// GetNodeName returns the NodeName for this endpoint.
128
121
func (info * BaseEndpointInfo ) GetNodeName () string {
129
122
return info .NodeName
@@ -414,18 +407,18 @@ func detectStaleConntrackEntries(oldEndpointsMap, newEndpointsMap EndpointsMap,
414
407
}
415
408
416
409
for _ , ep := range epList {
417
- // If the old endpoint wasn't Ready then there can't be stale
410
+ // If the old endpoint wasn't Serving then there can't be stale
418
411
// conntrack entries since there was no traffic sent to it.
419
- if ! ep .IsReady () {
412
+ if ! ep .IsServing () {
420
413
continue
421
414
}
422
415
423
416
deleted := true
424
417
// Check if the endpoint has changed, including if it went from
425
- // ready to not ready . If it did change stale entries for the old
418
+ // serving to not serving . If it did change stale entries for the old
426
419
// endpoint have to be cleared.
427
420
for i := range newEndpointsMap [svcPortName ] {
428
- if newEndpointsMap [svcPortName ][i ].Equal ( ep ) {
421
+ if newEndpointsMap [svcPortName ][i ].String () == ep . String ( ) {
429
422
deleted = false
430
423
break
431
424
}
@@ -446,21 +439,21 @@ func detectStaleConntrackEntries(oldEndpointsMap, newEndpointsMap EndpointsMap,
446
439
continue
447
440
}
448
441
449
- epReady := 0
442
+ epServing := 0
450
443
for _ , ep := range epList {
451
- if ep .IsReady () {
452
- epReady ++
444
+ if ep .IsServing () {
445
+ epServing ++
453
446
}
454
447
}
455
448
456
- oldEpReady := 0
449
+ oldEpServing := 0
457
450
for _ , ep := range oldEndpointsMap [svcPortName ] {
458
- if ep .IsReady () {
459
- oldEpReady ++
451
+ if ep .IsServing () {
452
+ oldEpServing ++
460
453
}
461
454
}
462
455
463
- if epReady > 0 && oldEpReady == 0 {
456
+ if epServing > 0 && oldEpServing == 0 {
464
457
* newlyActiveUDPServices = append (* newlyActiveUDPServices , svcPortName )
465
458
}
466
459
}
0 commit comments