I'm using fasthttp
to make an HTTP server in Go. When the user visits a certain route, say /foo
I want to start a very long running task (think 10m+), but respond to the request immediately. This long running task should continue running in the background until it exits even if the function returns or the user terminates the connection.
What is the best way to do that in Go?
As far as I can tell Goroutines are probably not the right thing because they're meant for short running async code, or am I wrong about that?