getPortMapInfo retrieves the current port-mapping programmed for the given sandbox
(sb *libnetwork.Sandbox)
| 1107 | |
| 1108 | // getPortMapInfo retrieves the current port-mapping programmed for the given sandbox |
| 1109 | func 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 | |
| 1121 | func getEndpointPortMapInfo(pm networktypes.PortMap, ep *libnetwork.Endpoint) { |
| 1122 | driverInfo, _ := ep.DriverInfo() |
no test coverage detected
searching dependent graphs…