Documentation ¶
Overview ¶
nolint: errcheck
nolint: errcheck
nolint: errcheck
nolint: errcheck
nolint: errcheck
Index ¶
- func NewSmuxTransporter(l *zap.SugaredLogger, ...) *smuxTransporter
- type BufferCh
- type BytePool
- type MTCP
- type MTCPClient
- type MTCPServer
- type MWSSClient
- type MWSSServer
- type Mwss
- type Raw
- type ReadOnlyMetricsReader
- type RelayTransporter
- type SessionWithMetrics
- type WSSServer
- type WSServer
- type WriteOnlyMetricsWriter
- type Ws
- type Wss
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSmuxTransporter ¶ added in v1.1.2
Types ¶
type BytePool ¶ added in v1.0.7
type BytePool struct {
// contains filtered or unexported fields
}
BytePool implements a leaky pool of []byte in the form of a bounded channel
var BufferPool *BytePool
全局pool
func NewBytePool ¶ added in v1.0.7
NewBytePool creates a new BytePool bounded to the given maxSize, with new byte arrays sized based on width.
type MTCPClient ¶ added in v1.1.2
type MTCPClient struct {
// contains filtered or unexported fields
}
func NewMTCPClient ¶ added in v1.1.2
func NewMTCPClient(l *zap.SugaredLogger) *MTCPClient
func (*MTCPClient) InitNewSession ¶ added in v1.1.2
type MTCPServer ¶ added in v1.1.2
type MTCPServer struct { L *zap.SugaredLogger // contains filtered or unexported fields }
func NewMTCPServer ¶ added in v1.1.2
func NewMTCPServer(listenAddr string, raw *Raw, l *zap.SugaredLogger) *MTCPServer
func (*MTCPServer) Accept ¶ added in v1.1.2
func (s *MTCPServer) Accept() (conn net.Conn, err error)
func (*MTCPServer) Close ¶ added in v1.1.2
func (s *MTCPServer) Close() error
func (*MTCPServer) ListenAndServe ¶ added in v1.1.2
func (s *MTCPServer) ListenAndServe() error
type MWSSClient ¶ added in v1.1.2
type MWSSClient struct {
// contains filtered or unexported fields
}
func NewMWSSClient ¶ added in v1.1.2
func NewMWSSClient(l *zap.SugaredLogger) *MWSSClient
func (*MWSSClient) InitNewSession ¶ added in v1.1.2
type MWSSServer ¶
type MWSSServer struct { L *zap.SugaredLogger // contains filtered or unexported fields }
func NewMWSSServer ¶ added in v1.0.6
func NewMWSSServer(listenAddr string, raw *Raw, l *zap.SugaredLogger) *MWSSServer
func (*MWSSServer) Close ¶
func (s *MWSSServer) Close() error
func (*MWSSServer) HandleRequest ¶ added in v1.1.2
func (s *MWSSServer) HandleRequest(w http.ResponseWriter, r *http.Request)
func (*MWSSServer) ListenAndServe ¶ added in v1.1.2
func (s *MWSSServer) ListenAndServe() error
type Raw ¶
type Raw struct { TCPRemotes lb.RoundRobin UDPRemotes lb.RoundRobin UDPBufferChMap map[string]*BufferCh L *zap.SugaredLogger // contains filtered or unexported fields }
type ReadOnlyMetricsReader ¶ added in v1.1.3
type RelayTransporter ¶
type RelayTransporter interface { // UDP相关 GetOrCreateBufferCh(uaddr *net.UDPAddr) *BufferCh HandleUDPConn(uaddr *net.UDPAddr, local *net.UDPConn) HandleTCPConn(c net.Conn, remote *lb.Node) error GetRemote() *lb.Node // contains filtered or unexported methods }
RelayTransporter
func PickTransporter ¶
func PickTransporter(transType string, tcpRemotes, udpRemotes lb.RoundRobin) RelayTransporter
type SessionWithMetrics ¶ added in v1.1.2
type SessionWithMetrics struct {
// contains filtered or unexported fields
}
func (*SessionWithMetrics) CanNotServe ¶ added in v1.1.2
func (sm *SessionWithMetrics) CanNotServe() bool
type WSSServer ¶ added in v1.1.2
type WSSServer struct { L *zap.SugaredLogger // contains filtered or unexported fields }
func NewWSSServer ¶ added in v1.1.2
func NewWSSServer(listenAddr string, raw *Raw, l *zap.SugaredLogger) *WSSServer
func (*WSSServer) HandleRequest ¶ added in v1.1.2
func (s *WSSServer) HandleRequest(w http.ResponseWriter, req *http.Request)
func (*WSSServer) ListenAndServe ¶ added in v1.1.2
type WSServer ¶ added in v1.1.2
type WSServer struct { L *zap.SugaredLogger // contains filtered or unexported fields }
func NewWSServer ¶ added in v1.1.2
func NewWSServer(listenAddr string, raw *Raw, l *zap.SugaredLogger) *WSServer
func (*WSServer) HandleRequest ¶ added in v1.1.2
func (s *WSServer) HandleRequest(w http.ResponseWriter, req *http.Request)
func (*WSServer) ListenAndServe ¶ added in v1.1.2
type WriteOnlyMetricsWriter ¶ added in v1.1.3
Source Files ¶
Click to show internal directories.
Click to hide internal directories.