Skip to content

Commit

Permalink
Add comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertodauria committed Apr 21, 2022
1 parent ae61919 commit 077f583
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ndt7.go
Expand Up @@ -180,6 +180,10 @@ func (c *Client) doConnect(ctx context.Context, serviceURL string) (*websocket.C
return conn, err
}

// nextURLFromLocate returns the next URL to try from the Locate API.
// If it's the first time we're calling this function, it contacts the Locate
// API. Subsequently, it returns the next URL from the cache.
// If there are no more URLs to try, it returns an error.
func (c *Client) nextURLFromLocate(ctx context.Context, p string) (string, error) {
if len(c.targets) == 0 {
targets, err := c.Locate.Nearest(ctx, "ndt/ndt7")
Expand Down

0 comments on commit 077f583

Please sign in to comment.