MCPcopy Create free account
hub / github.com/cloudfoundry/garden / NetIn

Method NetIn

client/connection/connection.go:295–317  ·  view source on GitHub ↗
(handle string, hostPort, containerPort uint32)

Source from the content-addressed store, hash-verified

293}
294
295func (c *connection) NetIn(handle string, hostPort, containerPort uint32) (uint32, uint32, error) {
296 res := &transport.NetInResponse{}
297
298 err := c.do(
299 routes.NetIn,
300 &transport.NetInRequest{
301 Handle: handle,
302 HostPort: hostPort,
303 ContainerPort: containerPort,
304 },
305 res,
306 rata.Params{
307 "handle": handle,
308 },
309 nil,
310 )
311
312 if err != nil {
313 return 0, 0, err
314 }
315
316 return res.HostPort, res.ContainerPort, nil
317}
318
319func (c *connection) BulkNetOut(handle string, rules []garden.NetOutRule) error {
320 return c.do(

Callers

nothing calls this directly

Calls 1

doMethod · 0.95

Tested by

no test coverage detected