本文整理汇总了Golang中github.com/mesos/mesos-go/mesosproto.OfferID类的典型用法代码示例。如果您正苦于以下问题:Golang OfferID类的具体用法?Golang OfferID怎么用?Golang OfferID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了OfferID类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: Rescind
func (oc *OfferCache) Rescind(offerId *mesos.OfferID) bool {
oc.mut.Lock()
defer oc.mut.Unlock()
_, present := oc.offerSet[offerId.GetValue()]
delete(oc.offerSet, offerId.GetValue())
return present
}
开发者ID:puppetizeme,项目名称:etcd-mesos,代码行数:7,代码来源:offercache.go
示例2: getOffer
// getOffer returns cached offer
func (cache *schedCache) getOffer(offerId *mesos.OfferID) *cachedOffer {
if offerId == nil {
log.V(3).Infoln("WARN: OfferId == nil, returning nil")
return nil
}
cache.lock.RLock()
defer cache.lock.RUnlock()
return cache.savedOffers[offerId.GetValue()]
}
开发者ID:40a,项目名称:bootkube,代码行数:10,代码来源:schedcache.go
示例3: OfferRescinded
// OfferRescinded is called when the resources are recinded from the scheduler.
func (k *KubernetesScheduler) OfferRescinded(driver bindings.SchedulerDriver, offerId *mesos.OfferID) {
log.Infof("Offer rescinded %v\n", offerId)
oid := offerId.GetValue()
k.offers.Delete(oid, offerMetrics.OfferRescinded)
}
开发者ID:niu-team,项目名称:kubernetes,代码行数:7,代码来源:scheduler.go
示例4: OfferRescinded
func (s *Scheduler) OfferRescinded(driver scheduler.SchedulerDriver, id *mesos.OfferID) {
Logger.Infof("[OfferRescinded] %s", id.GetValue())
}
开发者ID:elodina,项目名称:syscol,代码行数:3,代码来源:scheduler.go
示例5: OfferRescinded
func (sched *testScheduler) OfferRescinded(dr SchedulerDriver, oid *mesos.OfferID) {
log.Infoln("Sched.OfferRescinded() called.")
sched.s.NotNil(oid)
sched.s.Equal("test-offer-001", oid.GetValue())
sched.ch <- true
}
开发者ID:elodina,项目名称:stack-deploy,代码行数:6,代码来源:scheduler_intgr_test.go
示例6: OfferRescinded
func (sched *Scheduler) OfferRescinded(driver sched.SchedulerDriver, offerID *mesos.OfferID) {
glog.Infof("offer %s has been recinded before we could use it", offerID.GetValue())
}
开发者ID:betawaffle,项目名称:elevators,代码行数:3,代码来源:scheduler.go
示例7: removeOffer
func (cache *schedCache) removeOffer(offerId *mesos.OfferID) {
cache.lock.Lock()
delete(cache.savedOffers, offerId.GetValue())
cache.lock.Unlock()
}
开发者ID:40a,项目名称:bootkube,代码行数:5,代码来源:schedcache.go
示例8: containsOffer
// containsOff test cache for offer(offerId)
func (cache *schedCache) containsOffer(offerId *mesos.OfferID) bool {
cache.lock.RLock()
defer cache.lock.RUnlock()
_, ok := cache.savedOffers[offerId.GetValue()]
return ok
}
开发者ID:40a,项目名称:bootkube,代码行数:7,代码来源:schedcache.go
注:本文中的github.com/mesos/mesos-go/mesosproto.OfferID类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论