activator

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const APINameCtxKey ctxValue = "apiName"

Variables

This section is empty.

Functions

This section is empty.

Types

type Activator

type Activator interface {
	Try(ctx context.Context, fn func() error) error
}

func New

func New(
	istioClient istionetworkingclient.VirtualServiceInterface,
	deploymentInformer cache.SharedIndexInformer,
	virtualServiceInformer cache.SharedIndexInformer,
	autoscalerClient autoscaler.Client,
	reporter StatsReporter,
	logger *zap.SugaredLogger,
) Activator

type Handler

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

func NewHandler

func NewHandler(act Activator, logger *zap.SugaredLogger) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type PrometheusStatsReporter added in v0.39.0

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

func NewPrometheusStatsReporter added in v0.39.0

func NewPrometheusStatsReporter() *PrometheusStatsReporter

func (*PrometheusStatsReporter) AddAPI added in v0.39.0

func (r *PrometheusStatsReporter) AddAPI(apiName string)

func (*PrometheusStatsReporter) RemoveAPI added in v0.39.0

func (r *PrometheusStatsReporter) RemoveAPI(apiName string)

func (*PrometheusStatsReporter) ServeHTTP added in v0.39.0

func (r *PrometheusStatsReporter) ServeHTTP(w http.ResponseWriter, req *http.Request)

type StatsReporter added in v0.39.0

type StatsReporter interface {
	AddAPI(apiName string)
	RemoveAPI(apiName string)
}

Jump to

Keyboard shortcuts

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