forwarder

package
v0.0.0-...-01bebaf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

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"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL