MCPcopy Create free account
hub / github.com/cloudbase/garm / GetEntityScaleSet

Method GetEntityScaleSet

cache/entity_cache.go:309–321  ·  view source on GitHub ↗
(entityID string, scaleSetID uint)

Source from the content-addressed store, hash-verified

307}
308
309func (e *EntityCache) GetEntityScaleSet(entityID string, scaleSetID uint) (params.ScaleSet, bool) {
310 e.mux.Lock()
311 defer e.mux.Unlock()
312
313 if cache, ok := e.entities[entityID]; ok {
314 if _, ok := cache.ScaleSets[scaleSetID]; ok {
315 if scaleSet, ok := e.scalesets[scaleSetID]; ok {
316 return scaleSet, true
317 }
318 }
319 }
320 return params.ScaleSet{}, false
321}
322
323func (e *EntityCache) FindPoolsMatchingAllTags(entityID string, tags []string) []params.Pool {
324 e.mux.Lock()

Callers 1

GetEntityScaleSetFunction · 0.80

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected