-- | Sends a status update to the framework scheduler, retrying as
-- necessary until an acknowledgement has been received or the
 -- executor is terminated (in which case, a 'Lost' status update
 -- will be sent). See 'System.Mesos.Scheduler.statusUpdate' for more information
 -- about status update acknowledgements.
sendStatusUpdate :: ExecutorDriver -> TaskStatus -> IO Status
sendStatusUpdate (ExecutorDriver d) s = with (cppValue s) $ \sp -> do
  result <- c_sendExecutorDriverStatusUpdate d sp
  return $ toStatus result

-- | Sends a message to the framework scheduler. These messages are
-- best effort; do not expect a framework message to be
-- retransmitted in any reliable fashion.
sendStatusUpdate :: ExecutorDriver -> TaskStatus -> IO Status
sendStatusUpdate (ExecutorDriver d) s = with (cppValue s) $ \sp -> do
  result <- c_sendExecutorDriverStatusUpdate d sp
  return $ toStatus result

-- | Sends a message to the framework scheduler. These messages are
-- best effort; do not expect a framework message to be
-- retransmitted in any reliable fashion.
sendStatusUpdate (ExecutorDriver d) s = with (cppValue s) $ \sp -> do
  result <- c_sendExecutorDriverStatusUpdate d sp
  return $ toStatus result

-- | Sends a message to the framework scheduler. These messages are
-- best effort; do not expect a framework message to be
-- retransmitted in any reliable fashion.