kubernetes/test/e2e/storage/drivers/proxy/portproxy.go

const maxConcurrentConnections

const connectionPollInterval

// Listen creates a listener which returns new connections whenever someone connects
// to a socat or mock driver proxy instance running inside the given pod.
//
// socat must by started with "<listen>,fork TCP-LISTEN:<port>,reuseport"
// for this to work. "<listen>" can be anything that accepts connections,
// for example "UNIX-LISTEN:/csi/csi.sock". In this mode, socat will
// accept exactly one connection on the given port for each connection
// that socat itself accepted.
//
// Listening stops when the context is done or Close() is called.
func Listen(ctx context.Context, clientset kubernetes.Interface, restConfig *rest.Config, addr Addr) (net.Listener, error) {}

type Addr

var _

func (a Addr) Network() string {}

func (a Addr) String() string {}

type stream

func dial(ctx context.Context, prefix string, dialer httpstream.Dialer, port int) (s *stream, finalErr error) {}

func (s *stream) Close() {}

type listener

var _

func (l *listener) Close() error {}

func (l *listener) Accept() (net.Conn, error) {}

type connection

var _

func (c *connection) LocalAddr() net.Addr {}

func (c *connection) RemoteAddr() net.Addr {}

func (c *connection) SetDeadline(t time.Time) error {}

func (c *connection) SetReadDeadline(t time.Time) error {}

func (c *connection) SetWriteDeadline(t time.Time) error {}

func (c *connection) Read(b []byte) (int, error) {}

func (c *connection) Write(b []byte) (int, error) {}

func (c *connection) Close() error {}

func (l *listener) Addr() net.Addr {}