Open ZackButcher opened 7 years ago
A likely solution is to have a chan<- error
embedded in the Env
that can be used to push errors in go routines/daemons upstream. From there Mixer framework can use those values to make decisions.
How do you expect errors from daemons to be used by Mixer? Seems very adapter-specific behavior, doesn't it?
AFAIK we're planning on eventually supporting more sophisticated things like removing adapters that are causing errors automatically, right? If so, we want errors from go routines/daemons that the adapter starts to feed into that system as well, not just the runtime return errors.
Hmmm. I think we'll deal specifically with adapters that crash, not those that merely return errors. In that context, by forcing adapters to use Env for scheduling goroutines, we already have the protection in place for us to detect failures in adapter goroutines and handle them appropriately.
So I think we've got all the support we need/want already.
We expect adapter authors to use
adapter.Env
to start any go routines, including long-lived "daemon" go routines. However, we have no way for these jobs to return errors. We need to build out a way to communicate errors to the Mixer framework.