MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / InitContainerMap

Function InitContainerMap

pkg/funclet/container.go:127–140  ·  view source on GitHub ↗
(podName string, num int)

Source from the content-addressed store, hash-verified

125}
126
127func 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}

Callers 1

NewContainerManagerFunction · 0.85

Calls 2

NewEventLockFunction · 0.92
generateContainerIDFunction · 0.85

Tested by

no test coverage detected