Documentation ¶
Overview ¶
Package httpproxy is middleware that proxies requests to a HTTPs server doing DNS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RequestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{ Namespace: middleware.Namespace, Subsystem: subsystem, Name: "request_duration_milliseconds", Buckets: append(prometheus.DefBuckets, []float64{50, 100, 200, 500, 1000, 2000, 3000, 4000, 5000, 10000}...), Help: "Histogram of the time (in milliseconds) each request took.", }, []string{"zone"}) )
Metrics the httpproxy middleware exports.
Functions ¶
func OnStartupMetrics ¶
func OnStartupMetrics() error
OnStartupMetrics sets up the metrics on startup.
Types ¶
type Exchanger ¶
type Exchanger interface { Exchange(request.Request) (*dns.Msg, error) SetUpstream(*simpleUpstream) error OnStartup() error OnShutdown() error }
Exchanger is an interface that specifies a type implementing a DNS resolver that uses a HTTPS server.
type Proxy ¶
type Proxy struct { Next middleware.Handler // contains filtered or unexported fields }
Proxy represents a middleware instance that can proxy requests to HTTPS servers.
Click to show internal directories.
Click to hide internal directories.