activator

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

README

About the Activator

The name activator is actually a misnomer, since after Knative 0.2, the activator no longer activates inactive Revisions.

The only responsibilities of the activator are:

  • Receiving & buffering requests for inactive Revisions.
  • Reporting metrics to the autoscaler.
  • Retrying requests to a Revision after the autoscaler scales such Revision based on the reported metrics.

Documentation

Index

Constants

View Source
const (
	// Name is the name of the component.
	Name = "activator"
	// RevisionHeaderName is the header key for revision name.
	RevisionHeaderName = "Knative-Serving-Revision"
	// RevisionHeaderNamespace is the header key for revision's namespace.
	RevisionHeaderNamespace = "Knative-Serving-Namespace"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter holds cached metric objects to report autoscaler metrics

func NewStatsReporter

func NewStatsReporter() (*Reporter, error)

NewStatsReporter creates a reporter that collects and reports activator metrics

func (*Reporter) ReportRequestConcurrency

func (r *Reporter) ReportRequestConcurrency(ns, service, config, rev string, v int64) error

ReportRequestConcurrency captures request concurrency metric with value v.

func (*Reporter) ReportRequestCount

func (r *Reporter) ReportRequestCount(ns, service, config, rev string, responseCode, numTries int) error

ReportRequestCount captures request count.

func (*Reporter) ReportResponseTime

func (r *Reporter) ReportResponseTime(ns, service, config, rev string, responseCode int, d time.Duration) error

ReportResponseTime captures response time requests

type StatsReporter

type StatsReporter interface {
	ReportRequestConcurrency(ns, service, config, rev string, v int64) error
	ReportRequestCount(ns, service, config, rev string, responseCode, numTries int) error
	ReportResponseTime(ns, service, config, rev string, responseCode int, d time.Duration) error
}

StatsReporter defines the interface for sending activator metrics

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL