Make pmtiles.Extract(...) cancellable with own context
Hi, we are calling pmtiles.Extract() in our Go service and need the possibility to cancel the currently running extraction. For this we would like to be able to pass our own context to the method.
Do you just want to pass in a Context to Extract instead of using context.Background ?
Yes, because I want to be able to cancel a running extraction when I get a new request for an extraction in my Go service, which make the currently running extraction obsolete. What I am doing currently is to run the binary of go-pmtiles in a exec.CommandContext(), so that it runs in a process that I can entirely kill, so that this process can't occupy resources anymore.
Ideally I am able to use pmtiles.Extract() with a context I can create myself, like context.WithCancel(context.Background()), instead of calling a binary from my Go code.
This would of course imply that the current usage of context in pmtiles.Extract() is making use of the context in all meaningful places that should be cancellable.