handlers

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnTracker

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

ConnTracker uses Go's native sync.Map for safe, concurrent connection tracking.

func NewConnTracker

func NewConnTracker() *ConnTracker

func (*ConnTracker) Count

func (ct *ConnTracker) Count() int64

func (*ConnTracker) Track

func (ct *ConnTracker) Track(c net.Conn, state http.ConnState)

func (*ConnTracker) Wait

func (ct *ConnTracker) Wait(ctx context.Context)

type H3Listener

type H3Listener struct {
	Srv *http3.Server
}

func (*H3Listener) Addr

func (h *H3Listener) Addr() string

func (*H3Listener) Kind

func (h *H3Listener) Kind() string

func (*H3Listener) Start

func (h *H3Listener) Start() error

func (*H3Listener) Stop

func (h *H3Listener) Stop(ctx context.Context) error

type HTTPListener

type HTTPListener struct {
	Srv     *http.Server
	Tracker *ConnTracker
	IsTLS   bool
}

func (*HTTPListener) Addr

func (h *HTTPListener) Addr() string

func (*HTTPListener) Kind

func (h *HTTPListener) Kind() string

func (*HTTPListener) Start

func (h *HTTPListener) Start() error

func (*HTTPListener) Stop

func (h *HTTPListener) Stop(ctx context.Context) error

type Listener

type Listener interface {
	Start() error
	Stop(ctx context.Context) error
	Addr() string
	Kind() string
}

type Manager

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

func NewManager

func NewManager(cfg ManagerConfig) (*Manager, error)

func (*Manager) BuildListeners

func (m *Manager) BuildListeners() []Listener

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) CloseFirewall added in v0.0.6

func (m *Manager) CloseFirewall()

func (*Manager) Firewall

func (m *Manager) Firewall() *firewall.Engine

type ManagerConfig

type ManagerConfig struct {
	Global      *alaye.Global
	HostManager *discovery.Host
	Resource    *resource.Resource
	IPMgr       *zulu.IPManager
	CookManager *cook.Manager
	TLSManager  *tlss.Manager
	SharedState woos.SharedState
	OrchManager *orchestrator.Manager
}

type Route

type Route struct {
	Backends []*xhttp.Backend
	Proxy    *xhttp.Proxy
	// contains filtered or unexported fields
}

func FallbackRoute

func FallbackRoute(msg string) *Route

func NewRoute

func NewRoute(cfg resource.Proxy, route *alaye.Route) *Route

func (*Route) Close

func (h *Route) Close() error

func (*Route) ServeHTTP

func (h *Route) ServeHTTP(w http.ResponseWriter, r *http.Request)

type TCPListener

type TCPListener struct {
	Proxy *xtcp.Proxy
}

func (*TCPListener) Addr

func (t *TCPListener) Addr() string

func (*TCPListener) Kind

func (t *TCPListener) Kind() string

func (*TCPListener) Start

func (t *TCPListener) Start() error

func (*TCPListener) Stop

func (t *TCPListener) Stop(ctx context.Context) error

type UDPListener added in v0.1.0

type UDPListener struct {
	Proxy *xudp.Proxy
}

UDPListener wraps an xudp.Proxy and implements the Listener interface.

func (*UDPListener) Addr added in v0.1.0

func (u *UDPListener) Addr() string

func (*UDPListener) Kind added in v0.1.0

func (u *UDPListener) Kind() string

func (*UDPListener) Start added in v0.1.0

func (u *UDPListener) Start() error

func (*UDPListener) Stop added in v0.1.0

func (u *UDPListener) Stop(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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