Documentation
¶
Overview ¶
Package server provides a complete tunnel server with health endpoints.
Index ¶
- type Config
- type Server
- func (s *Server) AcquireConnection() error
- func (s *Server) GetHealthHandler() *health.Handler
- func (s *Server) GetResourceLimiter() *limiter.ConnectionLimiter
- func (s *Server) GetStats() quic.ServerStats
- func (s *Server) ReleaseConnection()
- func (s *Server) Start(ctx context.Context) error
- func (s *Server) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// QUIC configuration
ListenAddr string
TLSConfig *tls.Config
AuthToken string
// Resource limits
MaxConnections int64
MaxTunnels int
// Health endpoints
HealthAddr string // Address for health HTTP server, e.g., ":8080"
// Shutdown timeout
ShutdownTimeout time.Duration
}
Config holds the server configuration.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config with sensible defaults.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a complete tunnel server with all HA components.
func (*Server) AcquireConnection ¶
AcquireConnection attempts to acquire a connection slot.
func (*Server) GetHealthHandler ¶
GetHealthHandler returns the health handler for custom health checks.
func (*Server) GetResourceLimiter ¶
func (s *Server) GetResourceLimiter() *limiter.ConnectionLimiter
GetResourceLimiter returns the resource limiter.
func (*Server) GetStats ¶
func (s *Server) GetStats() quic.ServerStats
GetStats returns server statistics.
func (*Server) ReleaseConnection ¶
func (s *Server) ReleaseConnection()
ReleaseConnection releases a connection slot.
Click to show internal directories.
Click to hide internal directories.