// AcknowledgeUpdates generates a Handler that sends an Acknowledge call to Mesos for every
// UPDATE event that's received.
AcknowledgeUpdates generates a Handler that sends an Acknowledge call to Mesos for every
UPDATE event that's received.
// AcknowledgeUpdates generates a Handler that sends an Acknowledge call to Mesos for every // UPDATE event that ' s received .
func AcknowledgeUpdates(callerGetter func() calls.Caller) Handler {
	return WhenFunc(scheduler.Event_UPDATE, func(e *scheduler.Event) (err error) {
		var (
			s    = e.GetUpdate().GetStatus()
			uuid = s.GetUUID()
		)
		if len(uuid) > 0 {
			ack := calls.Acknowledge(
				s.AgentID.Value,
				s.TaskID.Value,
				uuid,
			)
			err = calls.CallNoData(callerGetter(), ack)
		}
		return
	})
}
func AcknowledgeUpdates ( callerGetter func ( ) calls . Caller ) Handler { return WhenFunc ( scheduler . Event_UPDATE , func ( e * scheduler . Event ) ( err error ) { var ( s = e . GetUpdate ( ) . GetStatus ( ) uuid = s . GetUUID ( ) ) if len ( uuid ) > 0 { ack := calls . Acknowledge ( s . AgentID . Value , s . TaskID . Value , uuid , ) err = calls . CallNoData ( callerGetter ( ) , ack ) } return } ) }
AcknowledgeUpdates generates a Handler that sends an Acknowledge call to Mesos for every
UPDATE event that's received.
AcknowledgeUpdates generates a Handler that sends an Acknowledge call to Mesos for every UPDATE event that ' s received .