Documentation ¶ Index ¶ func ListenAndForward(ctx context.Context, log klog.Logger, port int, target string, ...) error func ListenAndForwardUDP(ctx context.Context, log klog.Logger, port int, target string, ...) error type Forwarder func New(log klog.Logger, timeout time.Duration) Forwarder type Transport Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ListenAndForward ¶ func ListenAndForward(ctx context.Context, log klog.Logger, port int, target string, timeout time.Duration) error func ListenAndForwardUDP ¶ func ListenAndForwardUDP(ctx context.Context, log klog.Logger, port int, target string, timeout time.Duration) error Types ¶ type Forwarder ¶ type Forwarder interface { Forward(ctx context.Context, l net.Listener, target string) ForwardUDP(ctx context.Context, l net.PacketConn, target string) } func New ¶ func New(log klog.Logger, timeout time.Duration) Forwarder type Transport ¶ type Transport string const ( TCP Transport = "tcp" UDP Transport = "udp" ) Source Files ¶ View all Source files forwarder.go Click to show internal directories. Click to hide internal directories.