(entityID string)
| 341 | } |
| 342 | |
| 343 | func (e *EntityCache) GetEntityPools(entityID string) []params.Pool { |
| 344 | e.mux.Lock() |
| 345 | defer e.mux.Unlock() |
| 346 | |
| 347 | if cache, ok := e.entities[entityID]; ok { |
| 348 | var pools []params.Pool |
| 349 | for poolID := range cache.Pools { |
| 350 | if pool, ok := e.pools[poolID]; ok { |
| 351 | pools = append(pools, pool) |
| 352 | } |
| 353 | } |
| 354 | // Sort the pools by creation date. |
| 355 | sortByCreationDate(pools) |
| 356 | return pools |
| 357 | } |
| 358 | return nil |
| 359 | } |
| 360 | |
| 361 | func (e *EntityCache) GetEntityScaleSets(entityID string) []params.ScaleSet { |
| 362 | e.mux.Lock() |
no test coverage detected