I'm currently trying to use a golang and echo app as both a web server and a reverse proxy and running into some issues.
The main goal of this app is to allow a client to download files of various sizes (kbs - gbs). The problem I've run into is that I need to be able to keep a running total of the bytes received by the clients so that if the file download is interrupted before the download is complete, the web server can send off a request to another microservice saying that an error occurred and only N bytes were received by the client.
Any ideas? I've already played around with some middlewares but haven't had much luck apart from using Static for files.