shedder

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2022 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdmissionControl

func NewAdmissionControl(o Options) filters.Spec

Types

type AdmissionControlSpec

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

func (*AdmissionControlSpec) CreateFilter

func (spec *AdmissionControlSpec) CreateFilter(args []interface{}) (filters.Filter, error)

CreateFilter creates a new admissionControl filter with passed configuration:

admissionControl(metricSuffix, mode, d, windowSize, minRps, successThreshold, maxRejectProbability, exponent)
admissionControl("$app", "active", "1s", 5, 10, 0.1, 0.95, 0.5)

metricSuffix is the suffix key to expose reject counter, should be unique by filter instance mode is one of "active", "inactive", "logInactive"

active will reject traffic
inactive will never reject traffic
logInactive will not reject traffic, but log to debug filter settings

windowSize is within [minWindowSize, maxWindowSize] minRps threshold that needs to be reached such that the filter will apply successThreshold is within (0,1] and sets the lowest request success rate at which the filter will not reject requests. maxRejectProbability is within (0,1] and sets the upper bound of reject probability. exponent >0, 1: linear, 1/2: qudratic, 1/3: cubic, ..

see also https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/admission_control_filter#admission-control

func (*AdmissionControlSpec) Name

func (*AdmissionControlSpec) Name() string

func (*AdmissionControlSpec) PostProcessor

func (*AdmissionControlSpec) PostProcessor() *admissionControlPost

func (*AdmissionControlSpec) PreProcessor

func (*AdmissionControlSpec) PreProcessor() *admissionControlPre

type Options

type Options struct {
	Tracer opentracing.Tracer
}

Jump to

Keyboard shortcuts

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