(podName string, num int)
| 125 | } |
| 126 | |
| 127 | func InitContainerMap(podName string, num int) *ContainerMap { |
| 128 | cMap := &ContainerMap{ |
| 129 | CMap: sync.Map{}, |
| 130 | } |
| 131 | for i := 0; i < num; i++ { |
| 132 | cID := generateContainerID(podName, i) |
| 133 | cMap.CMap.Store(cID, &api.ContainerInfo{ |
| 134 | Hostname: cID, |
| 135 | ContainerID: cID, |
| 136 | EventLock: api.NewEventLock(), |
| 137 | }) |
| 138 | } |
| 139 | return cMap |
| 140 | } |
no test coverage detected