Documentation
¶
Overview ¶
Package proxy implements the Host-based reverse proxy router.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Router)
Option configures Router construction.
func WithAccessLog ¶
WithAccessLog enables one JSON object per line written to w.
func WithMetrics ¶
WithMetrics attaches Prometheus-style counters updated per request.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router matches Host and forwards via httputil.ReverseProxy.
func (*Router) Reload ¶
Reload replaces the route table and clears the reverse-proxy cache. When metrics are enabled, per-host counters are synced to the new route hostnames after the lock is released.
func (*Router) RouteCount ¶
RouteCount returns the number of configured host routes (cheap; for /_buick/health).
Click to show internal directories.
Click to hide internal directories.