this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 49 lines 2.1 kB view raw view rendered
1# proxycon 2 3See [doc/adr/design.md](./doc/adr/design.md) 4 5## Quickstart 6 7```bash 8❯ make run 9go build -ldflags "-s -w -X main.version=dev -X main.buildTime=2026-04-13T15:47:25Z" -trimpath -o bin/proxycon . 10./bin/proxycon --verbose 11time=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 12time=2026-04-13T17:47:29.971+02:00 level=INFO msg="loaded bitcoin prices from datasource" count=500000 13time=2026-04-13T17:47:29.971+02:00 level=INFO msg="starting proxycon" addr=:8080 page_size=10 version=dev 14time=2026-04-13T17:47:29.971+02:00 level=DEBUG msg="http server protocol" http1=true http2=true unencrypted=true 15time=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 16time=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 17time=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 18time=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 19``` 20 21```bash 22❯ make test 23> /list 24{ 25 "start": "2021-11-19T12:22:51Z", 26 "end": "2021-11-19T12:52:51Z", 27 "min": "5421868", 28 "max": "9800821", 29 "next_cursor": 10, 30... 31``` 32 33## TODO 34 35### Planned 36 37- [x] add upstream datasource req logging (meter if >=5ms) 38 39### Postponed 40 41- [ ] add stateful cache (bbolt, leveldb, or httpcache...) for bitcoin prices datasource (fetchPrices) 42- [ ] add goreleaser with arm support (in addition to amd64 arch) 43- [ ] use Huma on top of net/http (OpenAPI, standardization) 44- [ ] event streaming to client (SSE, or websocket, or gRPC) 45- [ ] write real tests (testify...) 46- [ ] add programmatic benchmark 47- [ ] add logging OTLP export capability 48- [ ] add `/health` endpoint 49- [ ] add `/metrics` endpoint (prometheus gauges)