package proxy
import "k8s.io/kubernetes/test/e2e/storage/drivers/proxy"
Index ¶
- func Listen(ctx context.Context, clientset kubernetes.Interface, restConfig *rest.Config, addr Addr) (net.Listener, error)
- type Addr
- type PodDirIO
Functions ¶
func Listen ¶
func Listen(ctx context.Context, clientset kubernetes.Interface, restConfig *rest.Config, addr Addr) (net.Listener, error)
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.
Types ¶
type Addr ¶
Addr contains all relevant parameters for a certain port in a pod. The container must be running before connections are attempted.
func (Addr) Network ¶
func (Addr) String ¶
type PodDirIO ¶
type PodDirIO struct { F *framework.Framework Namespace string PodName string ContainerName string Logger *klog.Logger }
func (PodDirIO) CreateFile ¶
func (PodDirIO) DirExists ¶
func (PodDirIO) Mkdir ¶
func (PodDirIO) RemoveAll ¶
func (PodDirIO) Rename ¶
Source Files ¶
io.go portproxy.go
- Version
- v1.33.0 (latest)
- Published
- Apr 23, 2025
- Platform
- linux/amd64
- Imports
- 22 packages
- Last checked
- 3 hours ago –
Tools for package owners.