MCPcopy
hub / github.com/moby/moby / getPortMapInfo

Function getPortMapInfo

daemon/network.go:1109–1119  ·  view source on GitHub ↗

getPortMapInfo retrieves the current port-mapping programmed for the given sandbox

(sb *libnetwork.Sandbox)

Source from the content-addressed store, hash-verified

1107
1108// getPortMapInfo retrieves the current port-mapping programmed for the given sandbox
1109func getPortMapInfo(sb *libnetwork.Sandbox) networktypes.PortMap {
1110 pm := networktypes.PortMap{}
1111 if sb == nil {
1112 return pm
1113 }
1114
1115 for _, ep := range sb.Endpoints() {
1116 getEndpointPortMapInfo(pm, ep)
1117 }
1118 return pm
1119}
1120
1121func getEndpointPortMapInfo(pm networktypes.PortMap, ep *libnetwork.Endpoint) {
1122 driverInfo, _ := ep.DriverInfo()

Callers 4

restoreMethod · 0.85
connectToNetworkMethod · 0.85
disconnectFromNetworkMethod · 0.85

Calls 2

getEndpointPortMapInfoFunction · 0.85
EndpointsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…