Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdmissionControl ¶
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, ..
func (*AdmissionControlSpec) Name ¶
func (*AdmissionControlSpec) Name() string
func (*AdmissionControlSpec) PostProcessor ¶
func (*AdmissionControlSpec) PostProcessor() *admissionControlPost
func (*AdmissionControlSpec) PreProcessor ¶
func (*AdmissionControlSpec) PreProcessor() *admissionControlPre
Click to show internal directories.
Click to hide internal directories.