module-update-router

command module
v0.0.0-...-88e8095 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-2.0 Imports: 36 Imported by: 0

README

PkgGoDev Go Report Card codecov

module-update-router is a microservice that determines whether a client should fetch a testing/prerelease module or a released/production module. It maintains a list of account IDs internally and will respond to GET requests to /api/v1/channel?module=<module-name> (for example, insights-core) with an appropriate URL fragment (either /testing or /release). It is worth noting that this service does not serve the module itself; the client must know where to retrieve the module. This service simply tells the client which module to retrieve.

Building

go build

Testing

go test

Running

go run .

Configuring

Configuration is done through environment variables.

  • ADDR: Address on which the HTTP server should listen (default: ":8080")
  • MADDR: Address on which the metrics HTTP server should listen (default: ":2112")
  • LOG_FORMAT: Format of log output (either "json" or "text") (default: "text")
  • DB_DRIVER: Database driver to use (either "pgx" or "sqlite") (default: "sqlite")
  • DATABASE_URL: A URL forming a database connection string (i.e. "file::memory:")
  • DB_HOST: Address of the database server (default: "localhost")
  • DB_PORT: TCP port of the database server (default: "5432")
  • DB_NAME: Name of the database (default: "postgres")
  • DB_USER: Username on the database server (default: "postgres")
  • DB_PASS: Password of the database user

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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