# proxycon See [doc/adr/design.md](./doc/adr/design.md) ## Quickstart ```bash ❯ make run go build -ldflags "-s -w -X main.version=dev -X main.buildTime=2026-04-13T15:47:25Z" -trimpath -o bin/proxycon . ./bin/proxycon --verbose time=2026-04-13T17:47:29.254+02:00 level=INFO msg="http client request" method=GET url=https://europe-west1-bitstack-test.cloudfunctions.net/coding-challenge-v2 duration=3.230734651s code=200 time=2026-04-13T17:47:29.971+02:00 level=INFO msg="loaded bitcoin prices from datasource" count=500000 time=2026-04-13T17:47:29.971+02:00 level=INFO msg="starting proxycon" addr=:8080 page_size=10 version=dev time=2026-04-13T17:47:29.971+02:00 level=DEBUG msg="http server protocol" http1=true http2=true unencrypted=true time=2026-04-13T17:47:31.641+02:00 level=INFO msg="http request" method=GET path=/list code=200 duration=57.537µs remote=127.0.0.1:44574 time=2026-04-13T17:47:31.645+02:00 level=INFO msg="http request" method=GET path=/price code=200 duration=24.363µs remote=127.0.0.1:44586 time=2026-04-13T17:47:31.650+02:00 level=INFO msg="http request" method=GET path=/price code=404 duration=1.31138ms remote=127.0.0.1:44598 time=2026-04-13T17:47:31.673+02:00 level=INFO msg="http request" method=GET path=/average code=200 duration=17.398744ms remote=127.0.0.1:44614 ``` ```bash ❯ make test > /list { "start": "2021-11-19T12:22:51Z", "end": "2021-11-19T12:52:51Z", "min": "5421868", "max": "9800821", "next_cursor": 10, ... ``` ## TODO ### Planned - [x] add upstream datasource req logging (meter if >=5ms) ### Postponed - [ ] add stateful cache (bbolt, leveldb, or httpcache...) for bitcoin prices datasource (fetchPrices) - [ ] add goreleaser with arm support (in addition to amd64 arch) - [ ] use Huma on top of net/http (OpenAPI, standardization) - [ ] event streaming to client (SSE, or websocket, or gRPC) - [ ] write real tests (testify...) - [ ] add programmatic benchmark - [ ] add logging OTLP export capability - [ ] add `/health` endpoint - [ ] add `/metrics` endpoint (prometheus gauges)