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

Method Exist

pkg/funclet/container.go:97–107  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

95}
96
97func (m *ContainerMap) Exist(id string) (info *api.ContainerInfo, exist bool) {
98 val, ok := m.CMap.Load(id)
99 if !ok {
100 return nil, false
101 }
102 info, ok = val.(*api.ContainerInfo)
103 if !ok {
104 return nil, false
105 }
106 return info, true
107}
108
109func (m *ContainerMap) UpdateContainerPid(id string, pid int) (err error) {
110 info, exist := m.Exist(id)

Callers 4

GetContainerMethod · 0.95
UpdateContainerPidMethod · 0.95
ContainerInfoMethod · 0.80

Calls 1

LoadMethod · 0.80

Tested by

no test coverage detected