()
| 59 | } |
| 60 | |
| 61 | func (i *InstanceCache) GetAllInstances() []params.Instance { |
| 62 | i.mux.Lock() |
| 63 | defer i.mux.Unlock() |
| 64 | |
| 65 | instances := make([]params.Instance, 0, len(i.cache)) |
| 66 | for _, instance := range i.cache { |
| 67 | instances = append(instances, instance) |
| 68 | } |
| 69 | sortByCreationDate(instances) |
| 70 | return instances |
| 71 | } |
| 72 | |
| 73 | func (i *InstanceCache) GetEntityForInstance(name string) (params.ForgeEntity, bool) { |
| 74 | instance, ok := i.GetInstance(name) |
no test coverage detected