Documentation ¶
Index ¶
- func ReadFromSession(conf *ClientConfig, session *common.Session, ...)
- func ReceiveData(conf *ClientConfig, st pb.Tunnel_InitTunnelClient, ...)
- func RunClient(ctx context.Context, opts ...ClientOption) error
- func SendData(conf *ClientConfig, stream pb.Tunnel_InitTunnelClient, ...)
- type ClientConfig
- type ClientOption
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadFromSession ¶
func ReadFromSession(conf *ClientConfig, session *common.Session, sessionsOut chan<- *common.Session)
func ReceiveData ¶
func ReceiveData(conf *ClientConfig, st pb.Tunnel_InitTunnelClient, sessionsOut chan<- *common.Session, port int32, scheme string)
func RunClient ¶
func RunClient(ctx context.Context, opts ...ClientOption) error
RunClient creates a GRPC tunnel client
func SendData ¶
func SendData(conf *ClientConfig, stream pb.Tunnel_InitTunnelClient, sessions <-chan *common.Session)
Types ¶
type ClientConfig ¶
type ClientConfig struct { TLS bool // contains filtered or unexported fields }
ClientConfig is a config object used to configure a GRPC tunnel from the client side. ClientOption should be used to modify this
type ClientOption ¶
type ClientOption func(*ClientConfig) error
ClientOption is an option able to be configured
func WithLogger ¶
func WithLogger(l log.FieldLogger) ClientOption
WithLogger sets the logger to be used by the server. if not set, output will be discarded
func WithServer ¶
func WithServer(host string, p int) ClientOption
WithServer configures the server this client uses
func WithTLS ¶
func WithTLS(cert, tlsHostOverride string) ClientOption
WithTLS configures the tunnel to use TLS and sets the certificate expected, and a optional tls hostname override.
func WithTunnels ¶
func WithTunnels(scheme string, tunnels ...string) ClientOption
WithTunnels configures the tunnels to be exposed by this client. Each string should be in the format of: localPort:remotePort
Click to show internal directories.
Click to hide internal directories.