Documentation ¶
Index ¶
- func ComponentID(component Component) string
- func ComponentIDExpanded(policyName string, componentIndex int64, policyHash string) string
- type Classifier
- type ClassifierID
- type Component
- type Engine
- type FluxMeter
- type FluxMeterID
- type Limiter
- type LimiterID
- type MultiMatchResult
- type Policy
- type RateLimiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComponentID ¶
ComponentID returns the metric ID for a component.
Types ¶
type Classifier ¶ added in v0.1.2
type Classifier interface { // GetSelector returns the selector. GetSelector() *selectorv1.Selector // GetClassifierID returns ClassifierID object that should uniquely identify classifier. GetClassifierID() ClassifierID }
Classifier interface.
type ClassifierID ¶ added in v0.1.2
ClassifierID is the ID of the Classifier.
func (ClassifierID) String ¶ added in v0.1.2
func (cID ClassifierID) String() string
String function returns the ClassifierID as a string.
type Component ¶
Component is the interface that wraps the GetPolicyName, GetPolicyHash, and GetComponentIndex methods.
type Engine ¶
type Engine interface { ProcessRequest(controlPoint selectors.ControlPoint, serviceIDs []services.ServiceID, labels selectors.Labels) *flowcontrolv1.CheckResponse RegisterConcurrencyLimiter(sa Limiter) error UnregisterConcurrencyLimiter(sa Limiter) error RegisterFluxMeter(fm FluxMeter) error UnregisterFluxMeter(fm FluxMeter) error GetFluxMeterHist(fluxMeterName, statusCode string, featureStatus string, decisionType flowcontrolv1.DecisionType) prometheus.Observer RegisterRateLimiter(l RateLimiter) error UnregisterRateLimiter(l RateLimiter) error RegisterClassifier(c Classifier) error UnregisterClassifier(c Classifier) error }
Engine is an interface for registering fluxmeters and schedulers.
type FluxMeter ¶
type FluxMeter interface { // GetSelector returns the selector GetSelector() *selectorv1.Selector // GetFluxMeterName returns the metric name GetFluxMeterName() string // GetFluxMeterID returns the flux meter ID GetFluxMeterID() FluxMeterID // GetBuckets returns the buckets GetBuckets() []float64 // GetHistogram returns the histogram observer for the flowcontrolv1.DecisionType GetHistogram(flowcontrolv1.DecisionType, string, string) prometheus.Observer }
FluxMeter in an interface for interacting with fluxmeters.
type FluxMeterID ¶
type FluxMeterID struct {
FluxMeterName string
}
FluxMeterID is the ID of the FluxMeter.
func (FluxMeterID) String ¶
func (fmID FluxMeterID) String() string
String function returns the FluxMeterID as a string.
type Limiter ¶
type Limiter interface { GetPolicyName() string GetSelector() *selectorv1.Selector RunLimiter(labels selectors.Labels) *flowcontrolv1.LimiterDecision GetLimiterID() LimiterID }
Limiter interface. Lifetime of this interface is per policy/component.
type MultiMatchResult ¶
type MultiMatchResult struct { ConcurrencyLimiters []Limiter FluxMeters []FluxMeter RateLimiters []RateLimiter Classifiers []Classifier }
MultiMatchResult is used as return value of PolicyConfigAPI.GetMatches.
func (*MultiMatchResult) PopulateFromMultiMatcher ¶
func (result *MultiMatchResult) PopulateFromMultiMatcher(mm *multimatcher.MultiMatcher[string, MultiMatchResult], labels selectors.Labels)
PopulateFromMultiMatcher populates result object with results from MultiMatcher.