Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivationHandler ¶
type ActivationHandler struct { Logger *zap.SugaredLogger Transport http.RoundTripper Reporter activator.StatsReporter Throttler *activator.Throttler // GetProbeCount is the number of attempts we should // make to network probe the queue-proxy after the revision becomes // ready before forwarding the payload. If zero, a network probe // is not required. GetProbeCount int GetRevision func(revID activator.RevisionID) (*v1alpha1.Revision, error) GetService func(namespace, name string) (*v1.Service, error) }
ActivationHandler will wait for an active endpoint for a revision to be available before proxing the request
func (*ActivationHandler) ServeHTTP ¶
func (a *ActivationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
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(podName string, reqChan chan ReqEvent, reportChan <-chan time.Time, statChan chan *autoscaler.StatMessage) *ConcurrencyReporter
NewConcurrencyReporter creates a ConcurrencyReporter which listens to incoming ReqEvents on reqChan and ticks on reportChan and reports stats on statChan.
func NewConcurrencyReporterWithClock ¶ added in v0.4.0
func NewConcurrencyReporterWithClock(podName string, reqChan chan ReqEvent, reportChan <-chan time.Time, statChan chan *autoscaler.StatMessage, clock system.Clock) *ConcurrencyReporter
NewConcurrencyReporterWithClock instantiates a new concurrency reporter which uses the passed clock.
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
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 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)
type ReqEvent ¶
type ReqEvent struct { Key string EventType ReqEventType }
ReqEvent represents an incoming/finished request with a given key
type ReqEventType ¶
type ReqEventType int
ReqEventType specifies the type of event (In/Out)
const ( // ReqIn represents an incoming request ReqIn ReqEventType = iota // ReqOut represents a finished request ReqOut )
type RequestEventHandler ¶
type RequestEventHandler struct { ReqChan chan ReqEvent // contains filtered or unexported fields }
RequestEventHandler sends events to the given channel.
func NewRequestEventHandler ¶
func NewRequestEventHandler(reqChan chan ReqEvent, next http.Handler) *RequestEventHandler
NewRequestEventHandler creates a handler that sends events about incoming/closed http connections to the given channel.
func (*RequestEventHandler) ServeHTTP ¶
func (h *RequestEventHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)