https://infracost.io logo
#contributors
Title
# contributors
b

blue-toothbrush-24598

09/01/2021, 2:57 PM
Regarding the
config
package, have we thought about making
ProjectContext
,
RunContext
etc compatible with the golang
context.Context
interface? It could (eventually) help with things like clean shutdown when the user presses Ctrl+C, or respecting global deadlines that the user wants to impose.
l

little-author-61621

09/01/2021, 3:00 PM
+1 my original intention was to move towards that
👍 1
b

blue-toothbrush-24598

09/01/2021, 3:24 PM
One caveat is that
context.Context
is immutable (
WithValue
et al return a copy) and furthermore, you can only set one value at a time, whereas IC contexts are mutable. Could result in a bit of a struggle to mesh the two.
I'll think about how to do this as I get deeper into IC's codebase.
9 Views