routriever

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 12 Imported by: 0

README

Routriever

Test Status Lint Status Go Report Card Coverage Status

Collects length of given routes and provides them as business metric to prometheus. The deployment will runs a pod, a service, and provides a service monitor to track the metric. The service monitor can be consumed by Prometheus.

API Key

Currently the service only supports TomTom as GPS service. You can create an API key in the TomTom Developer Portal. Before you can start the service locally you need to provide the api key. This can be done by setting is as environment variable TOM_TOM_API_KEY In PowerShell you set

$env:TOM_TOM_API_KEY = "<your tom tom api key>";

and in bash you can use

TOM_TOM_API_KEY="<your tom tom api key>"

Afterwards you can start the service.

Prerequisites to run locally

Run the project is using make. make is typically installed by default on Linux and Mac.

If you run on Windows, you can directly install it from gnuwin32 or via winget

winget install GnuWin32.Make

Futhermore you will need Docker and Python. Python is only used to set the API key without the need to persist it. If you do not want to use Python you may also create a file containing your API key and setting the environment variable SECRET_FILE_PATH to the file path of that file.

How to Use

You can check all make command by running

make help

How To Run Locally

To run the service locally, you can use docker-compose.

make start
K3D

Install K3D to run the service in a local kubernetes cluster. Ensure your turned on Kubernetes in Docker Desktop. Run the following command to start the service in a local kubernetes cluster.

make k3d-start

and stop it with

make k3d-stop
Test

You can use make to start the service

make test

Linting

Project used golangci-lint for linting.

https://golangci-lint.run/welcome/install/

Run the linting locally by executing

golangci-lint run ./...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app

Jump to

Keyboard shortcuts

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