Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConcurrencyReporter ¶ added in v0.4.0
type ConcurrencyReporter struct {
// contains filtered or unexported fields
}
ConcurrencyReporter reports stats based on incoming requests and ticks.
func NewConcurrencyReporter ¶
func NewConcurrencyReporter(ctx context.Context, podName string, statCh chan []asmetrics.StatMessage) *ConcurrencyReporter
NewConcurrencyReporter creates a ConcurrencyReporter which listens to incoming ReqEvents on reqCh and ticks on reportCh and reports stats on statCh.
func (*ConcurrencyReporter) Handler ¶ added in v0.17.0
func (cr *ConcurrencyReporter) Handler(next http.Handler) http.HandlerFunc
Handler returns a handler that records requests coming in/being finished in the stats machinery.
func (*ConcurrencyReporter) Run ¶ added in v0.4.0
func (cr *ConcurrencyReporter) Run(stopCh <-chan struct{})
Run runs until stopCh is closed and processes events on all incoming channels.
type HealthHandler ¶ added in v0.5.0
type HealthHandler struct { HealthCheck func() error NextHandler http.Handler Logger *zap.SugaredLogger }
HealthHandler handles responding to kubelet probes with a provided health check.
func (*HealthHandler) ServeHTTP ¶ added in v0.5.0
func (h *HealthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type MetricHandler ¶ added in v0.9.0
type MetricHandler struct {
// contains filtered or unexported fields
}
MetricHandler is a handler that records request metrics.
func NewMetricHandler ¶ added in v0.9.0
func NewMetricHandler(podName string, next http.Handler) *MetricHandler
NewMetricHandler creates a handler that collects and reports request metrics.
func (*MetricHandler) ServeHTTP ¶ added in v0.9.0
func (h *MetricHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ProbeHandler ¶ added in v0.4.0
ProbeHandler handles responding to Knative internal network probes.
func (*ProbeHandler) ServeHTTP ¶ added in v0.4.0
func (h *ProbeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)