This is a HTTP reverse proxy router built on top of
loads a routing table into memory from a MongoDB database and acts as a:
302redirects to new URLs.
410responses for resources that used to but no longer exist.
The sister project
router-api provides a read/write
interface to the underlying database and route reloading.
Recommended reading: How to Write Go Code
Use GOV.UK Docker to run any commands that follow.
You can run all tests by running:
triemux sub-packages have unit tests and benchmarks written
in Go's own testing framework. To run them individually:
go test -bench=. ./trie ./triemux
router itself doesn't really benefit from having unit tests around
individual functions. Instead it has a comprehensive set of integration
tests to exercise it's HTTP handling, error reporting, and performance.
go test ./integration_tests
This project uses Go Modules to vendor its dependencies. To update the dependencies:
go mod vendor