mesos-go
mesos-go copied to clipboard
Add driver graceful shutdown option
There is no way to stop the driver after all messages are sent to Mesos. Add GracefulStop function to driver that will wait for all message to be delivered and then stop the driver. GracefulStop should be blocking.
This part looks like unfinished, internally MesosExecutorDriver uses TODO context:
https://github.com/mesos/mesos-go/blob/master/executor/executor.go#L128
There should be a way to pass own Context (for example context.WithDeadline()) to Messenger interface used by driver to communicate with Mesos. It will allow to wait for the messages to be delivered or fail after defined time.