Documentation ¶
Index ¶
- type Middleware
- type Network
- func (n *Network) Listen(ctx context.Context, network string, address string, cfg net.ListenConfig) (any, error)
- func (n *Network) ListenBlocked(ctx context.Context, network string, address string, cfg net.ListenConfig) (any, error)
- func (n *Network) Logger() *zap.Logger
- func (n *Network) SetLogger(logger *zap.Logger)
- type SCION
- type UsagePool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
type Middleware struct{}
func (Middleware) CaddyModule ¶
func (Middleware) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (Middleware) ServeHTTP ¶
func (Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
ServeHTTP implements caddyhttp.MiddlewareHandler.
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network is a custom network that allows to listen on SCION addresses.
func (*Network) Listen ¶
func (n *Network) Listen( ctx context.Context, network string, address string, cfg net.ListenConfig, ) (any, error)
Listen returns a net.PacketConn that listens on the given address. It is used by caddyhttp to create a HTTP3 listener.
func (*Network) ListenBlocked ¶
func (n *Network) ListenBlocked( ctx context.Context, network string, address string, cfg net.ListenConfig, ) (any, error)
ListenBlocked returns a blocked net.Listener that will never accept a connection. It is used to fake a net.Listener for caddyhttp HTTP1.1 and HTTP2. It is required such that we can create a HTTP3 listener.
type SCION ¶
type SCION struct {
Network *Network
}
SCION implements a caddy module. Currently, it is used to initialize the logger for the global network. In the future, additional configuration can be parsed with this component.
func (SCION) CaddyModule ¶
func (SCION) CaddyModule() caddy.ModuleInfo
type UsagePool ¶
type UsagePool[K comparable, V any] struct { // contains filtered or unexported fields }
UsagePool is a type safe caddy.UsagePool
func NewUsagePool ¶
func NewUsagePool[K comparable, V any]() *UsagePool[K, V]