Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counting ¶
type Counting struct {
// contains filtered or unexported fields
}
func NewCounting ¶ added in v0.14.0
type EndpointResolver ¶ added in v0.14.0
type EndpointResolver struct {
// contains filtered or unexported fields
}
func NewEndpointResolver ¶ added in v0.14.0
func NewEndpointResolver(next http.Handler, readyCache *k8s.ReadyEndpointsCache, cfg EndpointResolverConfig) *EndpointResolver
NewEndpointResolver returns a middleware that resolves a ready backend endpoint for each request. It waits for at least one endpoint to become ready (handling cold starts) and optionally falls back to an alternate upstream when the backend does not become ready in time.
func (*EndpointResolver) ServeHTTP ¶ added in v0.14.0
func (er *EndpointResolver) ServeHTTP(w http.ResponseWriter, r *http.Request)
type EndpointResolverConfig ¶ added in v0.14.0
type Metrics ¶ added in v0.8.0
type Metrics struct {
// contains filtered or unexported fields
}
Metrics records request count and duration with bounded route identity labels. It creates a routeInfo in the request context before calling next, and reads the (potentially mutated) routeInfo after next returns to set metric labels.
func NewMetrics ¶ added in v0.8.0
func NewMetrics(next http.Handler, instruments *metrics.Instruments) *Metrics
Click to show internal directories.
Click to hide internal directories.