// Run executes a control loop that registers a framework with Mesos and processes the scheduler events
// that flow through the subscription. Upon disconnection, if the given Context reports !Done() then the
// controller will attempt to re-register the framework and continue processing events.
Run executes a control loop that registers a framework with Mesos and processes the scheduler events
that flow through the subscription. Upon disconnection, if the given Context reports !Done() then the
controller will attempt to re-register the framework and continue processing events.
// Run executes a control loop that registers a framework with Mesos and processes the scheduler events // that flow through the subscription . Upon disconnection if the given Context reports !Done () then the // controller will attempt to re - register the framework and continue processing events .
func (_ *controllerImpl) Run(config Config) (lastErr error) {
	subscribe := calls.Subscribe(config.Framework)
	for !config.Context.Done() {
		frameworkID := config.Context.FrameworkID()
		if config.Framework.GetFailoverTimeout() > 0 && frameworkID != "" {
			subscribe.Subscribe.FrameworkInfo.ID = &mesos.FrameworkID{Value: frameworkID}
		}
		<-config.RegistrationTokens
		resp, err := config.Caller.Call(subscribe)
		lastErr = processSubscription(config, resp, err)
		config.Context.Error(lastErr)
	}
	return
}
func ( _ * controllerImpl ) Run ( config Config ) ( lastErr error ) { subscribe := calls . Subscribe ( config . Framework ) for ! config . Context . Done ( ) { frameworkID := config . Context . FrameworkID ( ) if config . Framework . GetFailoverTimeout ( ) > 0 && frameworkID != " " { subscribe . Subscribe . FrameworkInfo . ID = & mesos . FrameworkID { Value : frameworkID } } <- config . RegistrationTokens resp , err := config . Caller . Call ( subscribe ) lastErr = processSubscription ( config , resp , err ) config . Context . Error ( lastErr ) } return }
Run executes a control loop that registers a framework with Mesos and processes the scheduler events
that flow through the subscription.
Run executes a control loop that registers a framework with Mesos and processes the scheduler events that flow through the subscription .