• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

m-lab / locate / 1660 / 1
83%
main: 83%

Build:
DEFAULT BRANCH: main
Ran 07 Jan 2026 01:40PM UTC
Files 36
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Jan 2026 01:31PM UTC coverage: 91.315% (+0.004%) from 91.311%
1660.1

push

travis-pro

web-flow
feat(api/locate): add authorization header (#231)

This seems the cleanest and less frictious way to enable the
m-lab/ndt7-client-go codebase to supply a token for the purpose of
identifying the client registration.

Technically speaking, this change is not extending the locate client API
for supporting /priority/v2/nearest requests rather it just adds the
ability of providing a token. (I do not know who's using this API but I
can imagine an organization having their own API requiring a token,
though I think it would be useful to clarify what is our user story
here.)

As a side effect, m-lab/ndt7-client-go would then choose the right URL
and provide a token, still invoking Nearest.

I tried other approaches but the fact that (1) the default base URL
includes the /v2/nearest path, (2) the default base URL could be
configured using CLI flags and (3) it is not clear to me who are the
users of this API prompted me to proceed more cautiously and just make
it possible to provide a token.

Ideally, more in the long term, I think it would be useful to confirm
the following:

1. who are the users of m-lab/locate/api/client and whether it is
possible to change the base URL to not include the /v2/nearest prefix,
so that it then makes sense to have another API called PriorityNearest
that invokes /priority/v2/nearest.

2. whether binding a CLI flag directly to a default value is necessary
or whether we can choose a more idiomatic path where the URL is a
string, the zero value is valid, we pick the right default base URL if
empty, and there is some additional mechanism for setting up the URL
from the CLI (this coupling between a library package and the CLI
strikes me as "too much coupling" between components).

Anyway, for now, this patch should be enough to unblock making progress
with m-lab/ndt7-client-go.

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://r... (continued)

2250 of 2464 relevant lines covered (91.31%)

1.02 hits per line

Source Files on job 1660.1
  • Tree
  • List 36
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 637326661
  • Travis Job 1660.1
  • 4ff6df8b on github
  • Prev Job for on main (#1651.1)
  • Next Job for on main (#1677.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc