@@ -88,19 +88,19 @@ func (r *RouteRegistry) Register(uri route.Uri, endpoint *route.Endpoint) {
88
88
return
89
89
}
90
90
91
- poolPutResult , routeAdded := r .register (uri , endpoint )
91
+ poolPutResult , routePoolAdded := r .register (uri , endpoint )
92
92
93
93
r .reporter .CaptureRegistryMessage (endpoint , poolPutResult .String ())
94
94
95
95
if poolPutResult == route .EndpointAdded && ! endpoint .UpdatedAt .IsZero () {
96
96
r .reporter .CaptureRouteRegistrationLatency (time .Since (endpoint .UpdatedAt ))
97
97
}
98
98
99
- if routeAdded {
99
+ if routePoolAdded {
100
100
r .logger .Info ("route-registered" , slog .Any ("uri" , uri ))
101
101
// for backward compatibility:
102
102
r .logger .Debug ("uri-added" , slog .Any ("uri" , uri ))
103
- r .reporter .CaptureRouteAdded ()
103
+ r .reporter .CaptureRoutesRegistered ()
104
104
}
105
105
106
106
switch poolPutResult {
@@ -123,7 +123,7 @@ func (r *RouteRegistry) Register(uri route.Uri, endpoint *route.Endpoint) {
123
123
}
124
124
}
125
125
126
- func (r * RouteRegistry ) register (uri route.Uri , endpoint * route.Endpoint ) (putResult route.PoolPutResult , routeAdded bool ) {
126
+ func (r * RouteRegistry ) register (uri route.Uri , endpoint * route.Endpoint ) (putResult route.PoolPutResult , routePoolAdded bool ) {
127
127
r .RLock ()
128
128
defer r .RUnlock ()
129
129
@@ -134,7 +134,7 @@ func (r *RouteRegistry) register(uri route.Uri, endpoint *route.Endpoint) (putRe
134
134
if pool == nil {
135
135
// release read lock, insertRouteKey() will acquire a write lock.
136
136
r .RUnlock ()
137
- pool , routeAdded = r .insertRouteKey (routekey , uri )
137
+ pool , routePoolAdded = r .insertRouteKey (routekey , uri )
138
138
r .RLock ()
139
139
}
140
140
@@ -146,7 +146,7 @@ func (r *RouteRegistry) register(uri route.Uri, endpoint *route.Endpoint) (putRe
146
146
// Overwrites the load balancing algorithm of a pool by that of a specified endpoint, if that is valid.
147
147
r .SetTimeOfLastUpdate (t )
148
148
149
- return putResult , routeAdded
149
+ return putResult , routePoolAdded
150
150
}
151
151
152
152
// insertRouteKey acquires a write lock, inserts the route key into the registry and releases the
@@ -186,7 +186,7 @@ func (r *RouteRegistry) Unregister(uri route.Uri, endpoint *route.Endpoint) {
186
186
187
187
if routeRemoved {
188
188
r .logger .Info ("route-unregistered" , slog .Any ("uri" , uri ))
189
- r .reporter .CaptureRouteDeleted ()
189
+ r .reporter .CaptureRoutesUnregistered ()
190
190
} else {
191
191
r .logger .Info ("route-not-unregistered" , slog .Any ("uri" , uri ))
192
192
}
0 commit comments