locate

command module
v0.14.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

README

locate

Version Build Status Coverage Status GoDoc Go Report Card

M-Lab Locate Service, a load balancer providing consistent “expected measurement quality” using access control.

Local Development

Secret Manager

Typically the locate service will run within a GCP environment, either AppEngine or GKE. In these cases, the locate service reads signer and verifier keys from GCP's secret manager. This dependency is not needed for local development.

Create JSON Web Keys for local development:

jwk-keygen --use=sig --alg=EdDSA --kid=localdev_20220415

You may reuse the same key for signer and verifier, or create multiple keys.

./locate \
    -key-source=local \
    -signer-secret-name ./jwk_sig_EdDSA_localdev_20220415 \
    -verify-secret-name ./jwk_sig_EdDSA_localdev_20220415.pub

Now you may visit localhost:8080 in your browser to see a response generating access_tokens using these keys. Of course, the URLs returns will not be valid for the public platform.

Redis

A docker-compose configuration file is provided to run a local instance of the locate service along with Redis.

In the root directory of the "locate" project, start a local build using default arguments and precomputed JSON Web Keys.

docker-compose up

To connect with the local redis instance, run the cmd/heartbeat command or use the redis-cli command from the terminal.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
locate
Package locate implements a client for the Locate API v2.
Package locate implements a client for the Locate API v2.
v2
Package v2 defines the request API for the location service.
Package v2 defines the request API for the location service.
Package clientgeo supports interfaces to different data sources to help identify client geo location for server selection.
Package clientgeo supports interfaces to different data sources to help identify client geo location for server selection.
cmd
Package connection provides a Websocket that will automatically reconnect if the connection is dropped.
Package connection provides a Websocket that will automatically reconnect if the connection is dropped.
Package handler provides a client and handlers for responding to locate requests.
Package handler provides a client and handlers for responding to locate requests.
Package proxy issues requests to the legacy mlab-ns service and parses responses.
Package proxy issues requests to the legacy mlab-ns service and parses responses.
Package secrets loads secrets from the Google Cloud Secret Manager.
Package secrets loads secrets from the Google Cloud Secret Manager.
Package static contains static information for the locate service.
Package static contains static information for the locate service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL