(entityID string)
| 359 | } |
| 360 | |
| 361 | func (e *EntityCache) GetEntityScaleSets(entityID string) []params.ScaleSet { |
| 362 | e.mux.Lock() |
| 363 | defer e.mux.Unlock() |
| 364 | |
| 365 | if cache, ok := e.entities[entityID]; ok { |
| 366 | var scaleSets []params.ScaleSet |
| 367 | for scaleSetID := range cache.ScaleSets { |
| 368 | if scaleSet, ok := e.scalesets[scaleSetID]; ok { |
| 369 | scaleSets = append(scaleSets, scaleSet) |
| 370 | } |
| 371 | } |
| 372 | // Sort the scale sets by creation date. |
| 373 | sortByID(scaleSets) |
| 374 | return scaleSets |
| 375 | } |
| 376 | return nil |
| 377 | } |
| 378 | |
| 379 | func (e *EntityCache) GetEntitiesUsingEndpoint(endpoint params.ForgeEndpoint) []params.ForgeEntity { |
| 380 | e.mux.Lock() |
no test coverage detected