transporter

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

nolint: errcheck

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNetDialer added in v1.1.5

func NewNetDialer(cfg *conf.Config) *net.Dialer

func NewTCPListener added in v1.1.5

func NewTCPListener(ctx context.Context, cfg *conf.Config) (net.Listener, error)

Types

type BaseRelayServer added in v1.1.5

type BaseRelayServer struct {
	// contains filtered or unexported fields
}

func (*BaseRelayServer) Close added in v1.1.5

func (b *BaseRelayServer) Close() error

func (*BaseRelayServer) HealthCheck added in v1.1.5

func (b *BaseRelayServer) HealthCheck(ctx context.Context) (int64, error)

func (*BaseRelayServer) ListenAndServe added in v1.1.5

func (b *BaseRelayServer) ListenAndServe(ctx context.Context) error

func (*BaseRelayServer) RelayTCPConn added in v1.1.5

func (b *BaseRelayServer) RelayTCPConn(ctx context.Context, c net.Conn, remote *lb.Node) error

func (*BaseRelayServer) RelayUDPConn added in v1.1.5

func (b *BaseRelayServer) RelayUDPConn(ctx context.Context, c net.Conn, remote *lb.Node) error

type RawClient added in v1.1.4

type RawClient struct {
	// contains filtered or unexported fields
}

func (*RawClient) HandShake added in v1.1.5

func (raw *RawClient) HandShake(ctx context.Context, remote *lb.Node, isTCP bool) (net.Conn, error)

type RawServer added in v1.1.4

type RawServer struct {
	*BaseRelayServer
	// contains filtered or unexported fields
}

func (*RawServer) Close added in v1.1.4

func (s *RawServer) Close() error

func (*RawServer) ListenAndServe added in v1.1.4

func (s *RawServer) ListenAndServe(ctx context.Context) error

type RelayClient added in v1.1.4

type RelayClient interface {
	HandShake(ctx context.Context, remote *lb.Node, isTCP bool) (net.Conn, error)
}

TODO opt this interface

type RelayServer added in v1.1.4

type RelayServer interface {
	ListenAndServe(ctx context.Context) error
	Close() error

	RelayTCPConn(ctx context.Context, c net.Conn, remote *lb.Node) error
	RelayUDPConn(ctx context.Context, c net.Conn, remote *lb.Node) error
	HealthCheck(ctx context.Context) (int64, error) // latency in ms
}

func NewRelayServer added in v1.1.4

func NewRelayServer(cfg *conf.Config, cmgr cmgr.Cmgr) (RelayServer, error)

type WsClient added in v1.1.4

type WsClient struct {
	// contains filtered or unexported fields
}

func (*WsClient) HandShake added in v1.1.5

func (s *WsClient) HandShake(ctx context.Context, remote *lb.Node, isTCP bool) (net.Conn, error)

type WsServer added in v1.1.4

type WsServer struct {
	*BaseRelayServer
	// contains filtered or unexported fields
}

func (*WsServer) Close added in v1.1.4

func (s *WsServer) Close() error

func (*WsServer) ListenAndServe added in v1.1.4

func (s *WsServer) ListenAndServe(ctx context.Context) error

type WssClient added in v1.1.4

type WssClient struct {
	*WsClient
}

type WssServer added in v1.1.4

type WssServer struct {
	*WsServer
}

func (*WssServer) ListenAndServe added in v1.1.5

func (s *WssServer) ListenAndServe(ctx context.Context) error

Jump to

Keyboard shortcuts

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