本文整理匯總了Golang中github.com/mesos/mesos-go/mesosproto.MasterInfo.GetId方法的典型用法代碼示例。如果您正苦於以下問題:Golang MasterInfo.GetId方法的具體用法?Golang MasterInfo.GetId怎麽用?Golang MasterInfo.GetId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/mesos/mesos-go/mesosproto.MasterInfo
的用法示例。
在下文中一共展示了MasterInfo.GetId方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Reregistered
// Reregistered is called when the Scheduler is Reregistered
func (s *Scheduler) Reregistered(driver mesossched.SchedulerDriver, masterInfo *mesosproto.MasterInfo) {
logrus.WithFields(logrus.Fields{
"master_id": masterInfo.GetId(),
"master": masterInfo.GetHostname(),
}).Debug("Framework re-registered with master.")
if !s.initialised {
driver.ReconcileTasks([]*mesosproto.TaskStatus{})
s.initialised = true
} else {
s.Reconcile(driver)
}
}
示例2: Reregistered
func (sched *Scheduler) Reregistered(driver sched.SchedulerDriver, masterInfo *mesos.MasterInfo) {
glog.Infof("re-registered with master %s", masterInfo.GetId())
}
示例3: Registered
func (sched *Scheduler) Registered(driver sched.SchedulerDriver, frameworkID *mesos.FrameworkID, masterInfo *mesos.MasterInfo) {
glog.Infof("registered with master %s", masterInfo.GetId())
}
示例4: masterString
func masterString(info *mesos.MasterInfo) string {
return fmt.Sprintf("Id %v Ip %v Hostname %v Port %v Version %v Pid %v",
info.GetId(), info.GetIp(), info.GetHostname(), info.GetPort(), info.GetVersion(), info.GetPid())
}