flowcontrol

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Module returns the fx options for dataplane side pieces of policy.

func NewEngine

func NewEngine(agentInfo *agentinfo.AgentInfo) iface.Engine

NewEngine Main fx app.

Types

type Engine

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

Engine APIs to (1) Get schedulers given a service, control point and set of labels. (2) Get flux meter histogram given a metric id.

func (*Engine) GetAgentInfo added in v1.6.0

func (e *Engine) GetAgentInfo() *agentinfo.AgentInfo

GetAgentInfo returns the agent info.

func (*Engine) GetFluxMeter

func (e *Engine) GetFluxMeter(fluxMeterName string) iface.FluxMeter

GetFluxMeter Lookup function for getting flux meter.

func (*Engine) GetLoadScheduler added in v1.6.0

func (e *Engine) GetLoadScheduler(limiterID iface.LimiterID) iface.LoadScheduler

GetLoadScheduler Lookup function for getting load scheduler.

func (*Engine) GetRateLimiter

func (e *Engine) GetRateLimiter(limiterID iface.LimiterID) iface.RateLimiter

GetRateLimiter Lookup function for getting rate limiter.

func (*Engine) GetRegulator added in v1.6.0

func (e *Engine) GetRegulator(limiterID iface.LimiterID) iface.Limiter

GetRegulator Lookup function for getting load regulator.

func (*Engine) ProcessRequest

func (e *Engine) ProcessRequest(
	ctx context.Context,
	requestContext iface.RequestContext,
) (response *flowcontrolv1.CheckResponse)

ProcessRequest .

func (*Engine) RegisterFluxMeter

func (e *Engine) RegisterFluxMeter(fm iface.FluxMeter) error

RegisterFluxMeter adds fluxmeter to histogram map and multimatcher.

func (*Engine) RegisterLabelPreview added in v0.17.0

func (e *Engine) RegisterLabelPreview(lp iface.LabelPreview) error

RegisterLabelPreview adds label preview to multimatcher.

func (*Engine) RegisterLoadScheduler added in v1.6.0

func (e *Engine) RegisterLoadScheduler(cl iface.LoadScheduler) error

RegisterLoadScheduler adds load scheduler to multimatcher.

func (*Engine) RegisterRateLimiter

func (e *Engine) RegisterRateLimiter(rl iface.RateLimiter) error

RegisterRateLimiter adds limiter actuator to multimatcher.

func (*Engine) RegisterRegulator added in v1.6.0

func (e *Engine) RegisterRegulator(l iface.Limiter) error

RegisterRegulator adds limiter actuator to multimatcher.

func (*Engine) UnregisterFluxMeter

func (e *Engine) UnregisterFluxMeter(fm iface.FluxMeter) error

UnregisterFluxMeter removes fluxmeter from histogram map and multimatcher.

func (*Engine) UnregisterLabelPreview added in v0.17.0

func (e *Engine) UnregisterLabelPreview(lp iface.LabelPreview) error

UnregisterLabelPreview removes label preview from multimatcher.

func (*Engine) UnregisterLoadScheduler added in v1.6.0

func (e *Engine) UnregisterLoadScheduler(cl iface.LoadScheduler) error

UnregisterLoadScheduler removes load scheduler from multimatcher.

func (*Engine) UnregisterRateLimiter

func (e *Engine) UnregisterRateLimiter(rl iface.RateLimiter) error

UnregisterRateLimiter removes limiter actuator from multimatcher.

func (*Engine) UnregisterRegulator added in v1.6.0

func (e *Engine) UnregisterRegulator(rl iface.Limiter) error

UnregisterRegulator removes limiter actuator from multimatcher.

Directories

Path Synopsis
resources
Companion package for github.com/fluxninja/aperture/api/gen/proto/go/aperture/policy/language/v1 containing conversions of proto-generated struct into golang ones and other helpers.
Companion package for github.com/fluxninja/aperture/api/gen/proto/go/aperture/policy/language/v1 containing conversions of proto-generated struct into golang ones and other helpers.
preview/config
+kubebuilder:validation:Optional
+kubebuilder:validation:Optional

Jump to

Keyboard shortcuts

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