Documentation ¶
Overview ¶
nolint: errcheck
Index ¶
- func NewNetDialer(cfg *conf.Config) *net.Dialer
- func NewTCPListener(ctx context.Context, cfg *conf.Config) (net.Listener, error)
- type BaseRelayServer
- func (b *BaseRelayServer) Close() error
- func (b *BaseRelayServer) HealthCheck(ctx context.Context) (int64, error)
- func (b *BaseRelayServer) ListenAndServe(ctx context.Context) error
- func (b *BaseRelayServer) RelayTCPConn(ctx context.Context, c net.Conn, remote *lb.Node) error
- func (b *BaseRelayServer) RelayUDPConn(ctx context.Context, c net.Conn, remote *lb.Node) error
- type RawClient
- type RawServer
- type RelayClient
- type RelayServer
- type WsClient
- type WsServer
- type WssClient
- type WssServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 (*BaseRelayServer) RelayUDPConn ¶ added in v1.1.5
type RawClient ¶ added in v1.1.4
type RawClient struct {
// contains filtered or unexported fields
}
type RawServer ¶ added in v1.1.4
type RawServer struct { *BaseRelayServer // contains filtered or unexported fields }
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
type WsServer ¶ added in v1.1.4
type WsServer struct { *BaseRelayServer // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.