Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // DialEndpoint must contain an HTTP URL which will be used for connection upgrade // e.g. https://<public-ip>:12345/tunnel DialEndpoint string // DialMethod must contain an HTTP method to be used for request, e.g. POST DialMethod string // ForwardAddr is an address which will receive the data stream from remote service // 127.0.0.1 if not specified ForwardAddr string // ForwardPort is the number of port which will receive the data stream from remote service ForwardPort int // RequestDecorator allows to modify the request before it is sent to the Port Forwarder RequestDecorator func(req *http.Request) // Debug enables debug logging Debug bool }
Config specifies the configuration for PortForwarderClient
type PortForwarderClient ¶
type PortForwarderClient interface { // StartForwarding starts a goroutine which initiates the connection to remote service. //It will try to re-connect in case of failure. StartForwarding(ctx context.Context, minRetryInterval, maxRetryInterval time.Duration) // Ready returns true if client currently has an active forwarding connection Ready() bool // Close terminates the connection Close() error }
PortForwarderClient allows the remote service to bypass the client firewall by using long-running connection
Click to show internal directories.
Click to hide internal directories.