(runtimeID string)
| 139 | } |
| 140 | |
| 141 | func (m *RuntimeManager) GetRuntime(runtimeID string) (ri *RuntimeInfo, err error) { |
| 142 | val, loaded := m.rtMap.Load(runtimeID) |
| 143 | if !loaded { |
| 144 | return nil, RuntimeNotExist{RuntimeID: runtimeID} |
| 145 | } |
| 146 | rt, ok := val.(*RuntimeInfo) |
| 147 | if !ok { |
| 148 | return nil, RuntimeInfoError{RuntimeID: runtimeID} |
| 149 | } |
| 150 | return rt, nil |
| 151 | } |
| 152 | |
| 153 | func (m *RuntimeManager) RuntimeStatistics() (cold, inUse, all int) { |
| 154 | rtlist := m.RuntimeList() |