// eventLoop returns the framework ID received by mesos (if any); callers should check for a
// framework ID regardless of whether error != nil.
eventLoop returns the framework ID received by mesos (if any); callers should check for a
framework ID regardless of whether error != nil.
// eventLoop returns the framework ID received by mesos ( if any ) ; callers should check for a // framework ID regardless of whether error ! = nil .
func eventLoop(config Config, eventDecoder encoding.Decoder) (err error) {
	h := config.Handler
	if h == nil {
		h = events.HandlerFunc(DefaultHandler)
	}
	for err == nil && !config.Context.Done() {
		var e scheduler.Event
		if err = eventDecoder.Invoke(&e); err == nil {
			err = h.HandleEvent(&e)
		}
	}
	return err
}
func eventLoop ( config Config , eventDecoder encoding . Decoder ) ( err error ) { h := config . Handler if h == nil { h = events . HandlerFunc ( DefaultHandler ) } for err == nil && ! config . Context . Done ( ) { var e scheduler . Event if err = eventDecoder . Invoke ( & e ) ; err == nil { err = h . HandleEvent ( & e ) } } return err }
eventLoop returns the framework ID received by mesos (if any); callers should check for a
framework ID regardless of whether error != nil.
eventLoop returns the framework ID received by mesos ( if any ) ; callers should check for a framework ID regardless of whether error ! = nil .