mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
![Justin Cormack](/assets/img/avatar_default.png)
Rather than re-execing docker as the proxy, create a new command docker-proxy that is much smaller to save memory in the case where there are a lot of procies being created. Also allows the proxy to be replaced, for example in Docker for Mac we have a proxy that proxies to osx instead of locally. This is the vendoring pull for https://github.com/docker/docker/pull/23312 Signed-off-by: Justin Cormack <justin.cormack@docker.com>
18 lines
350 B
Go
18 lines
350 B
Go
package portmapper
|
|
|
|
import "net"
|
|
|
|
func newMockProxyCommand(proto string, hostIP net.IP, hostPort int, containerIP net.IP, containerPort int) (userlandProxy, error) {
|
|
return &mockProxyCommand{}, nil
|
|
}
|
|
|
|
type mockProxyCommand struct {
|
|
}
|
|
|
|
func (p *mockProxyCommand) Start() error {
|
|
return nil
|
|
}
|
|
|
|
func (p *mockProxyCommand) Stop() error {
|
|
return nil
|
|
}
|