@@ -206,31 +206,31 @@ func NewClient(logger log.Logger, cfg EndpointsConfig, client *http.Client, prov
206206}
207207
208208// Do executes an HTTP request with the underlying HTTP client.
209- func (f * Client ) Do (req * http.Request ) (* http.Response , error ) {
210- return f .httpClient .Do (req )
209+ func (c * Client ) Do (req * http.Request ) (* http.Response , error ) {
210+ return c .httpClient .Do (req )
211211}
212212
213213// Endpoints returns the list of known endpoints.
214- func (f * Client ) Endpoints () []* url.URL {
214+ func (c * Client ) Endpoints () []* url.URL {
215215 var urls []* url.URL
216- for _ , addr := range f .provider .Addresses () {
216+ for _ , addr := range c .provider .Addresses () {
217217 urls = append (urls ,
218218 & url.URL {
219- Scheme : f .scheme ,
219+ Scheme : c .scheme ,
220220 Host : addr ,
221- Path : path .Join ("/" , f .prefix ),
221+ Path : path .Join ("/" , c .prefix ),
222222 },
223223 )
224224 }
225225 return urls
226226}
227227
228228// Discover runs the service to discover endpoints until the given context is done.
229- func (f * Client ) Discover (ctx context.Context ) {
229+ func (c * Client ) Discover (ctx context.Context ) {
230230 var wg sync.WaitGroup
231231 ch := make (chan []* targetgroup.Group )
232232
233- for _ , d := range f .fileDiscoverers {
233+ for _ , d := range c .fileDiscoverers {
234234 wg .Add (1 )
235235 go func (d * file.Discovery ) {
236236 d .Run (ctx , ch )
@@ -246,7 +246,7 @@ func (f *Client) Discover(ctx context.Context) {
246246 if update == nil {
247247 continue
248248 }
249- f .fileSDCache .Update (update )
249+ c .fileSDCache .Update (update )
250250 case <- ctx .Done ():
251251 return
252252 }
@@ -256,6 +256,6 @@ func (f *Client) Discover(ctx context.Context) {
256256}
257257
258258// Resolve refreshes and resolves the list of targets.
259- func (f * Client ) Resolve (ctx context.Context ) {
260- f .provider .Resolve (ctx , append (f .fileSDCache .Addresses (), f .staticAddresses ... ))
259+ func (c * Client ) Resolve (ctx context.Context ) {
260+ c .provider .Resolve (ctx , append (c .fileSDCache .Addresses (), c .staticAddresses ... ))
261261}
0 commit comments