Documentation
¶
Overview ¶
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.
Index ¶
- type MockClassificationEngine
- func (m *MockClassificationEngine) EXPECT() *MockClassificationEngineMockRecorder
- func (m *MockClassificationEngine) GetClassifier(classifierID iface.ClassifierID) iface.Classifier
- func (m *MockClassificationEngine) RegisterClassifier(classifier iface.Classifier) error
- func (m *MockClassificationEngine) UnregisterClassifier(classifier iface.Classifier) error
- type MockClassificationEngineMockRecorder
- func (mr *MockClassificationEngineMockRecorder) GetClassifier(classifierID interface{}) *gomock.Call
- func (mr *MockClassificationEngineMockRecorder) RegisterClassifier(classifier interface{}) *gomock.Call
- func (mr *MockClassificationEngineMockRecorder) UnregisterClassifier(classifier interface{}) *gomock.Call
- type MockClassifier
- type MockClassifierMockRecorder
- type MockEngine
- func (m *MockEngine) EXPECT() *MockEngineMockRecorder
- func (m *MockEngine) GetAgentInfo() *agentinfo.AgentInfo
- func (m *MockEngine) GetFluxMeter(fluxMeterName string) iface.FluxMeter
- func (m *MockEngine) GetRateLimiter(limiterID iface.LimiterID) iface.RateLimiter
- func (m *MockEngine) GetRegulator(limiterID iface.LimiterID) iface.Limiter
- func (m *MockEngine) GetScheduler(limiterID iface.LimiterID) iface.Scheduler
- func (m *MockEngine) ProcessRequest(ctx context.Context, requestContext iface.RequestContext) *checkv1.CheckResponse
- func (m *MockEngine) RegisterFluxMeter(fm iface.FluxMeter) error
- func (m *MockEngine) RegisterLabelPreview(l iface.LabelPreview) error
- func (m *MockEngine) RegisterRateLimiter(l iface.RateLimiter) error
- func (m *MockEngine) RegisterRegulator(l iface.Limiter) error
- func (m *MockEngine) RegisterScheduler(ls iface.Scheduler) error
- func (m *MockEngine) UnregisterFluxMeter(fm iface.FluxMeter) error
- func (m *MockEngine) UnregisterLabelPreview(l iface.LabelPreview) error
- func (m *MockEngine) UnregisterRateLimiter(l iface.RateLimiter) error
- func (m *MockEngine) UnregisterRegulator(l iface.Limiter) error
- func (m *MockEngine) UnregisterScheduler(ls iface.Scheduler) error
- type MockEngineMockRecorder
- func (mr *MockEngineMockRecorder) GetAgentInfo() *gomock.Call
- func (mr *MockEngineMockRecorder) GetFluxMeter(fluxMeterName interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) GetRateLimiter(limiterID interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) GetRegulator(limiterID interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) GetScheduler(limiterID interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) ProcessRequest(ctx, requestContext interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) RegisterFluxMeter(fm interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) RegisterLabelPreview(l interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) RegisterRateLimiter(l interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) RegisterRegulator(l interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) RegisterScheduler(ls interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) UnregisterFluxMeter(fm interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) UnregisterLabelPreview(l interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) UnregisterRateLimiter(l interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) UnregisterRegulator(l interface{}) *gomock.Call
- func (mr *MockEngineMockRecorder) UnregisterScheduler(ls interface{}) *gomock.Call
- type MockFluxMeter
- func (m *MockFluxMeter) EXPECT() *MockFluxMeterMockRecorder
- func (m *MockFluxMeter) GetAttributeKey() string
- func (m *MockFluxMeter) GetFluxMeterID() iface.FluxMeterID
- func (m *MockFluxMeter) GetFluxMeterName() string
- func (m *MockFluxMeter) GetHistogram(labels map[string]string) prometheus.Observer
- func (m *MockFluxMeter) GetInvalidFluxMeterTotal(labels map[string]string) (prometheus.Counter, error)
- func (m *MockFluxMeter) GetSelectors() []*languagev1.Selector
- type MockFluxMeterMockRecorder
- func (mr *MockFluxMeterMockRecorder) GetAttributeKey() *gomock.Call
- func (mr *MockFluxMeterMockRecorder) GetFluxMeterID() *gomock.Call
- func (mr *MockFluxMeterMockRecorder) GetFluxMeterName() *gomock.Call
- func (mr *MockFluxMeterMockRecorder) GetHistogram(labels interface{}) *gomock.Call
- func (mr *MockFluxMeterMockRecorder) GetInvalidFluxMeterTotal(labels interface{}) *gomock.Call
- func (mr *MockFluxMeterMockRecorder) GetSelectors() *gomock.Call
- type MockLimiter
- func (m *MockLimiter) Decide(ctx context.Context, labels map[string]string) *checkv1.LimiterDecision
- func (m *MockLimiter) EXPECT() *MockLimiterMockRecorder
- func (m *MockLimiter) GetLimiterID() iface.LimiterID
- func (m *MockLimiter) GetPolicyName() string
- func (m *MockLimiter) GetRequestCounter(labels map[string]string) prometheus.Counter
- func (m *MockLimiter) GetSelectors() []*languagev1.Selector
- func (m *MockLimiter) Revert(labels map[string]string, decision *checkv1.LimiterDecision)
- type MockLimiterMockRecorder
- func (mr *MockLimiterMockRecorder) Decide(ctx, labels interface{}) *gomock.Call
- func (mr *MockLimiterMockRecorder) GetLimiterID() *gomock.Call
- func (mr *MockLimiterMockRecorder) GetPolicyName() *gomock.Call
- func (mr *MockLimiterMockRecorder) GetRequestCounter(labels interface{}) *gomock.Call
- func (mr *MockLimiterMockRecorder) GetSelectors() *gomock.Call
- func (mr *MockLimiterMockRecorder) Revert(labels, decision interface{}) *gomock.Call
- type MockRateLimiter
- func (m *MockRateLimiter) Decide(ctx context.Context, labels map[string]string) *checkv1.LimiterDecision
- func (m *MockRateLimiter) EXPECT() *MockRateLimiterMockRecorder
- func (m *MockRateLimiter) GetLimiterID() iface.LimiterID
- func (m *MockRateLimiter) GetPolicyName() string
- func (m *MockRateLimiter) GetRequestCounter(labels map[string]string) prometheus.Counter
- func (m *MockRateLimiter) GetSelectors() []*languagev1.Selector
- func (m *MockRateLimiter) Revert(labels map[string]string, decision *checkv1.LimiterDecision)
- func (m *MockRateLimiter) TakeIfAvailable(labels map[string]string, count float64) (string, bool, float64, float64)
- type MockRateLimiterMockRecorder
- func (mr *MockRateLimiterMockRecorder) Decide(ctx, labels interface{}) *gomock.Call
- func (mr *MockRateLimiterMockRecorder) GetLimiterID() *gomock.Call
- func (mr *MockRateLimiterMockRecorder) GetPolicyName() *gomock.Call
- func (mr *MockRateLimiterMockRecorder) GetRequestCounter(labels interface{}) *gomock.Call
- func (mr *MockRateLimiterMockRecorder) GetSelectors() *gomock.Call
- func (mr *MockRateLimiterMockRecorder) Revert(labels, decision interface{}) *gomock.Call
- func (mr *MockRateLimiterMockRecorder) TakeIfAvailable(labels, count interface{}) *gomock.Call
- type MockScheduler
- func (m *MockScheduler) Decide(ctx context.Context, labels map[string]string) *checkv1.LimiterDecision
- func (m *MockScheduler) EXPECT() *MockSchedulerMockRecorder
- func (m *MockScheduler) GetLatencyObserver(labels map[string]string) prometheus.Observer
- func (m *MockScheduler) GetLimiterID() iface.LimiterID
- func (m *MockScheduler) GetPolicyName() string
- func (m *MockScheduler) GetRequestCounter(labels map[string]string) prometheus.Counter
- func (m *MockScheduler) GetSelectors() []*languagev1.Selector
- func (m *MockScheduler) Revert(labels map[string]string, decision *checkv1.LimiterDecision)
- type MockSchedulerMockRecorder
- func (mr *MockSchedulerMockRecorder) Decide(ctx, labels interface{}) *gomock.Call
- func (mr *MockSchedulerMockRecorder) GetLatencyObserver(labels interface{}) *gomock.Call
- func (mr *MockSchedulerMockRecorder) GetLimiterID() *gomock.Call
- func (mr *MockSchedulerMockRecorder) GetPolicyName() *gomock.Call
- func (mr *MockSchedulerMockRecorder) GetRequestCounter(labels interface{}) *gomock.Call
- func (mr *MockSchedulerMockRecorder) GetSelectors() *gomock.Call
- func (mr *MockSchedulerMockRecorder) Revert(labels, decision interface{}) *gomock.Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClassificationEngine ¶
type MockClassificationEngine struct {
// contains filtered or unexported fields
}
MockClassificationEngine is a mock of ClassificationEngine interface.
func NewMockClassificationEngine ¶
func NewMockClassificationEngine(ctrl *gomock.Controller) *MockClassificationEngine
NewMockClassificationEngine creates a new mock instance.
func (*MockClassificationEngine) EXPECT ¶
func (m *MockClassificationEngine) EXPECT() *MockClassificationEngineMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClassificationEngine) GetClassifier ¶
func (m *MockClassificationEngine) GetClassifier(classifierID iface.ClassifierID) iface.Classifier
GetClassifier mocks base method.
func (*MockClassificationEngine) RegisterClassifier ¶
func (m *MockClassificationEngine) RegisterClassifier(classifier iface.Classifier) error
RegisterClassifier mocks base method.
func (*MockClassificationEngine) UnregisterClassifier ¶
func (m *MockClassificationEngine) UnregisterClassifier(classifier iface.Classifier) error
UnregisterClassifier mocks base method.
type MockClassificationEngineMockRecorder ¶
type MockClassificationEngineMockRecorder struct {
// contains filtered or unexported fields
}
MockClassificationEngineMockRecorder is the mock recorder for MockClassificationEngine.
func (*MockClassificationEngineMockRecorder) GetClassifier ¶
func (mr *MockClassificationEngineMockRecorder) GetClassifier(classifierID interface{}) *gomock.Call
GetClassifier indicates an expected call of GetClassifier.
func (*MockClassificationEngineMockRecorder) RegisterClassifier ¶
func (mr *MockClassificationEngineMockRecorder) RegisterClassifier(classifier interface{}) *gomock.Call
RegisterClassifier indicates an expected call of RegisterClassifier.
func (*MockClassificationEngineMockRecorder) UnregisterClassifier ¶
func (mr *MockClassificationEngineMockRecorder) UnregisterClassifier(classifier interface{}) *gomock.Call
UnregisterClassifier indicates an expected call of UnregisterClassifier.
type MockClassifier ¶
type MockClassifier struct {
// contains filtered or unexported fields
}
MockClassifier is a mock of Classifier interface.
func NewMockClassifier ¶
func NewMockClassifier(ctrl *gomock.Controller) *MockClassifier
NewMockClassifier creates a new mock instance.
func (*MockClassifier) EXPECT ¶
func (m *MockClassifier) EXPECT() *MockClassifierMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClassifier) GetClassifierID ¶
func (m *MockClassifier) GetClassifierID() iface.ClassifierID
GetClassifierID mocks base method.
func (*MockClassifier) GetRequestCounter ¶
func (m *MockClassifier) GetRequestCounter() prometheus.Counter
GetRequestCounter mocks base method.
func (*MockClassifier) GetSelectors ¶
func (m *MockClassifier) GetSelectors() []*languagev1.Selector
GetSelectors mocks base method.
type MockClassifierMockRecorder ¶
type MockClassifierMockRecorder struct {
// contains filtered or unexported fields
}
MockClassifierMockRecorder is the mock recorder for MockClassifier.
func (*MockClassifierMockRecorder) GetClassifierID ¶
func (mr *MockClassifierMockRecorder) GetClassifierID() *gomock.Call
GetClassifierID indicates an expected call of GetClassifierID.
func (*MockClassifierMockRecorder) GetRequestCounter ¶
func (mr *MockClassifierMockRecorder) GetRequestCounter() *gomock.Call
GetRequestCounter indicates an expected call of GetRequestCounter.
func (*MockClassifierMockRecorder) GetSelectors ¶
func (mr *MockClassifierMockRecorder) GetSelectors() *gomock.Call
GetSelectors indicates an expected call of GetSelectors.
type MockEngine ¶
type MockEngine struct {
// contains filtered or unexported fields
}
MockEngine is a mock of Engine interface.
func NewMockEngine ¶
func NewMockEngine(ctrl *gomock.Controller) *MockEngine
NewMockEngine creates a new mock instance.
func (*MockEngine) EXPECT ¶
func (m *MockEngine) EXPECT() *MockEngineMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEngine) GetAgentInfo ¶
func (m *MockEngine) GetAgentInfo() *agentinfo.AgentInfo
GetAgentInfo mocks base method.
func (*MockEngine) GetFluxMeter ¶
func (m *MockEngine) GetFluxMeter(fluxMeterName string) iface.FluxMeter
GetFluxMeter mocks base method.
func (*MockEngine) GetRateLimiter ¶
func (m *MockEngine) GetRateLimiter(limiterID iface.LimiterID) iface.RateLimiter
GetRateLimiter mocks base method.
func (*MockEngine) GetRegulator ¶
func (m *MockEngine) GetRegulator(limiterID iface.LimiterID) iface.Limiter
GetRegulator mocks base method.
func (*MockEngine) GetScheduler ¶ added in v2.2.0
func (m *MockEngine) GetScheduler(limiterID iface.LimiterID) iface.Scheduler
GetScheduler mocks base method.
func (*MockEngine) ProcessRequest ¶
func (m *MockEngine) ProcessRequest(ctx context.Context, requestContext iface.RequestContext) *checkv1.CheckResponse
ProcessRequest mocks base method.
func (*MockEngine) RegisterFluxMeter ¶
func (m *MockEngine) RegisterFluxMeter(fm iface.FluxMeter) error
RegisterFluxMeter mocks base method.
func (*MockEngine) RegisterLabelPreview ¶
func (m *MockEngine) RegisterLabelPreview(l iface.LabelPreview) error
RegisterLabelPreview mocks base method.
func (*MockEngine) RegisterRateLimiter ¶
func (m *MockEngine) RegisterRateLimiter(l iface.RateLimiter) error
RegisterRateLimiter mocks base method.
func (*MockEngine) RegisterRegulator ¶
func (m *MockEngine) RegisterRegulator(l iface.Limiter) error
RegisterRegulator mocks base method.
func (*MockEngine) RegisterScheduler ¶ added in v2.2.0
func (m *MockEngine) RegisterScheduler(ls iface.Scheduler) error
RegisterScheduler mocks base method.
func (*MockEngine) UnregisterFluxMeter ¶
func (m *MockEngine) UnregisterFluxMeter(fm iface.FluxMeter) error
UnregisterFluxMeter mocks base method.
func (*MockEngine) UnregisterLabelPreview ¶
func (m *MockEngine) UnregisterLabelPreview(l iface.LabelPreview) error
UnregisterLabelPreview mocks base method.
func (*MockEngine) UnregisterRateLimiter ¶
func (m *MockEngine) UnregisterRateLimiter(l iface.RateLimiter) error
UnregisterRateLimiter mocks base method.
func (*MockEngine) UnregisterRegulator ¶
func (m *MockEngine) UnregisterRegulator(l iface.Limiter) error
UnregisterRegulator mocks base method.
func (*MockEngine) UnregisterScheduler ¶ added in v2.2.0
func (m *MockEngine) UnregisterScheduler(ls iface.Scheduler) error
UnregisterScheduler mocks base method.
type MockEngineMockRecorder ¶
type MockEngineMockRecorder struct {
// contains filtered or unexported fields
}
MockEngineMockRecorder is the mock recorder for MockEngine.
func (*MockEngineMockRecorder) GetAgentInfo ¶
func (mr *MockEngineMockRecorder) GetAgentInfo() *gomock.Call
GetAgentInfo indicates an expected call of GetAgentInfo.
func (*MockEngineMockRecorder) GetFluxMeter ¶
func (mr *MockEngineMockRecorder) GetFluxMeter(fluxMeterName interface{}) *gomock.Call
GetFluxMeter indicates an expected call of GetFluxMeter.
func (*MockEngineMockRecorder) GetRateLimiter ¶
func (mr *MockEngineMockRecorder) GetRateLimiter(limiterID interface{}) *gomock.Call
GetRateLimiter indicates an expected call of GetRateLimiter.
func (*MockEngineMockRecorder) GetRegulator ¶
func (mr *MockEngineMockRecorder) GetRegulator(limiterID interface{}) *gomock.Call
GetRegulator indicates an expected call of GetRegulator.
func (*MockEngineMockRecorder) GetScheduler ¶ added in v2.2.0
func (mr *MockEngineMockRecorder) GetScheduler(limiterID interface{}) *gomock.Call
GetScheduler indicates an expected call of GetScheduler.
func (*MockEngineMockRecorder) ProcessRequest ¶
func (mr *MockEngineMockRecorder) ProcessRequest(ctx, requestContext interface{}) *gomock.Call
ProcessRequest indicates an expected call of ProcessRequest.
func (*MockEngineMockRecorder) RegisterFluxMeter ¶
func (mr *MockEngineMockRecorder) RegisterFluxMeter(fm interface{}) *gomock.Call
RegisterFluxMeter indicates an expected call of RegisterFluxMeter.
func (*MockEngineMockRecorder) RegisterLabelPreview ¶
func (mr *MockEngineMockRecorder) RegisterLabelPreview(l interface{}) *gomock.Call
RegisterLabelPreview indicates an expected call of RegisterLabelPreview.
func (*MockEngineMockRecorder) RegisterRateLimiter ¶
func (mr *MockEngineMockRecorder) RegisterRateLimiter(l interface{}) *gomock.Call
RegisterRateLimiter indicates an expected call of RegisterRateLimiter.
func (*MockEngineMockRecorder) RegisterRegulator ¶
func (mr *MockEngineMockRecorder) RegisterRegulator(l interface{}) *gomock.Call
RegisterRegulator indicates an expected call of RegisterRegulator.
func (*MockEngineMockRecorder) RegisterScheduler ¶ added in v2.2.0
func (mr *MockEngineMockRecorder) RegisterScheduler(ls interface{}) *gomock.Call
RegisterScheduler indicates an expected call of RegisterScheduler.
func (*MockEngineMockRecorder) UnregisterFluxMeter ¶
func (mr *MockEngineMockRecorder) UnregisterFluxMeter(fm interface{}) *gomock.Call
UnregisterFluxMeter indicates an expected call of UnregisterFluxMeter.
func (*MockEngineMockRecorder) UnregisterLabelPreview ¶
func (mr *MockEngineMockRecorder) UnregisterLabelPreview(l interface{}) *gomock.Call
UnregisterLabelPreview indicates an expected call of UnregisterLabelPreview.
func (*MockEngineMockRecorder) UnregisterRateLimiter ¶
func (mr *MockEngineMockRecorder) UnregisterRateLimiter(l interface{}) *gomock.Call
UnregisterRateLimiter indicates an expected call of UnregisterRateLimiter.
func (*MockEngineMockRecorder) UnregisterRegulator ¶
func (mr *MockEngineMockRecorder) UnregisterRegulator(l interface{}) *gomock.Call
UnregisterRegulator indicates an expected call of UnregisterRegulator.
func (*MockEngineMockRecorder) UnregisterScheduler ¶ added in v2.2.0
func (mr *MockEngineMockRecorder) UnregisterScheduler(ls interface{}) *gomock.Call
UnregisterScheduler indicates an expected call of UnregisterScheduler.
type MockFluxMeter ¶
type MockFluxMeter struct {
// contains filtered or unexported fields
}
MockFluxMeter is a mock of FluxMeter interface.
func NewMockFluxMeter ¶
func NewMockFluxMeter(ctrl *gomock.Controller) *MockFluxMeter
NewMockFluxMeter creates a new mock instance.
func (*MockFluxMeter) EXPECT ¶
func (m *MockFluxMeter) EXPECT() *MockFluxMeterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFluxMeter) GetAttributeKey ¶
func (m *MockFluxMeter) GetAttributeKey() string
GetAttributeKey mocks base method.
func (*MockFluxMeter) GetFluxMeterID ¶
func (m *MockFluxMeter) GetFluxMeterID() iface.FluxMeterID
GetFluxMeterID mocks base method.
func (*MockFluxMeter) GetFluxMeterName ¶
func (m *MockFluxMeter) GetFluxMeterName() string
GetFluxMeterName mocks base method.
func (*MockFluxMeter) GetHistogram ¶
func (m *MockFluxMeter) GetHistogram(labels map[string]string) prometheus.Observer
GetHistogram mocks base method.
func (*MockFluxMeter) GetInvalidFluxMeterTotal ¶
func (m *MockFluxMeter) GetInvalidFluxMeterTotal(labels map[string]string) (prometheus.Counter, error)
GetInvalidFluxMeterTotal mocks base method.
func (*MockFluxMeter) GetSelectors ¶
func (m *MockFluxMeter) GetSelectors() []*languagev1.Selector
GetSelectors mocks base method.
type MockFluxMeterMockRecorder ¶
type MockFluxMeterMockRecorder struct {
// contains filtered or unexported fields
}
MockFluxMeterMockRecorder is the mock recorder for MockFluxMeter.
func (*MockFluxMeterMockRecorder) GetAttributeKey ¶
func (mr *MockFluxMeterMockRecorder) GetAttributeKey() *gomock.Call
GetAttributeKey indicates an expected call of GetAttributeKey.
func (*MockFluxMeterMockRecorder) GetFluxMeterID ¶
func (mr *MockFluxMeterMockRecorder) GetFluxMeterID() *gomock.Call
GetFluxMeterID indicates an expected call of GetFluxMeterID.
func (*MockFluxMeterMockRecorder) GetFluxMeterName ¶
func (mr *MockFluxMeterMockRecorder) GetFluxMeterName() *gomock.Call
GetFluxMeterName indicates an expected call of GetFluxMeterName.
func (*MockFluxMeterMockRecorder) GetHistogram ¶
func (mr *MockFluxMeterMockRecorder) GetHistogram(labels interface{}) *gomock.Call
GetHistogram indicates an expected call of GetHistogram.
func (*MockFluxMeterMockRecorder) GetInvalidFluxMeterTotal ¶
func (mr *MockFluxMeterMockRecorder) GetInvalidFluxMeterTotal(labels interface{}) *gomock.Call
GetInvalidFluxMeterTotal indicates an expected call of GetInvalidFluxMeterTotal.
func (*MockFluxMeterMockRecorder) GetSelectors ¶
func (mr *MockFluxMeterMockRecorder) GetSelectors() *gomock.Call
GetSelectors indicates an expected call of GetSelectors.
type MockLimiter ¶
type MockLimiter struct {
// contains filtered or unexported fields
}
MockLimiter is a mock of Limiter interface.
func NewMockLimiter ¶
func NewMockLimiter(ctrl *gomock.Controller) *MockLimiter
NewMockLimiter creates a new mock instance.
func (*MockLimiter) Decide ¶
func (m *MockLimiter) Decide(ctx context.Context, labels map[string]string) *checkv1.LimiterDecision
Decide mocks base method.
func (*MockLimiter) EXPECT ¶
func (m *MockLimiter) EXPECT() *MockLimiterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockLimiter) GetLimiterID ¶
func (m *MockLimiter) GetLimiterID() iface.LimiterID
GetLimiterID mocks base method.
func (*MockLimiter) GetPolicyName ¶
func (m *MockLimiter) GetPolicyName() string
GetPolicyName mocks base method.
func (*MockLimiter) GetRequestCounter ¶
func (m *MockLimiter) GetRequestCounter(labels map[string]string) prometheus.Counter
GetRequestCounter mocks base method.
func (*MockLimiter) GetSelectors ¶
func (m *MockLimiter) GetSelectors() []*languagev1.Selector
GetSelectors mocks base method.
func (*MockLimiter) Revert ¶
func (m *MockLimiter) Revert(labels map[string]string, decision *checkv1.LimiterDecision)
Revert mocks base method.
type MockLimiterMockRecorder ¶
type MockLimiterMockRecorder struct {
// contains filtered or unexported fields
}
MockLimiterMockRecorder is the mock recorder for MockLimiter.
func (*MockLimiterMockRecorder) Decide ¶
func (mr *MockLimiterMockRecorder) Decide(ctx, labels interface{}) *gomock.Call
Decide indicates an expected call of Decide.
func (*MockLimiterMockRecorder) GetLimiterID ¶
func (mr *MockLimiterMockRecorder) GetLimiterID() *gomock.Call
GetLimiterID indicates an expected call of GetLimiterID.
func (*MockLimiterMockRecorder) GetPolicyName ¶
func (mr *MockLimiterMockRecorder) GetPolicyName() *gomock.Call
GetPolicyName indicates an expected call of GetPolicyName.
func (*MockLimiterMockRecorder) GetRequestCounter ¶
func (mr *MockLimiterMockRecorder) GetRequestCounter(labels interface{}) *gomock.Call
GetRequestCounter indicates an expected call of GetRequestCounter.
func (*MockLimiterMockRecorder) GetSelectors ¶
func (mr *MockLimiterMockRecorder) GetSelectors() *gomock.Call
GetSelectors indicates an expected call of GetSelectors.
func (*MockLimiterMockRecorder) Revert ¶
func (mr *MockLimiterMockRecorder) Revert(labels, decision interface{}) *gomock.Call
Revert indicates an expected call of Revert.
type MockRateLimiter ¶
type MockRateLimiter struct {
// contains filtered or unexported fields
}
MockRateLimiter is a mock of RateLimiter interface.
func NewMockRateLimiter ¶
func NewMockRateLimiter(ctrl *gomock.Controller) *MockRateLimiter
NewMockRateLimiter creates a new mock instance.
func (*MockRateLimiter) Decide ¶
func (m *MockRateLimiter) Decide(ctx context.Context, labels map[string]string) *checkv1.LimiterDecision
Decide mocks base method.
func (*MockRateLimiter) EXPECT ¶
func (m *MockRateLimiter) EXPECT() *MockRateLimiterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRateLimiter) GetLimiterID ¶
func (m *MockRateLimiter) GetLimiterID() iface.LimiterID
GetLimiterID mocks base method.
func (*MockRateLimiter) GetPolicyName ¶
func (m *MockRateLimiter) GetPolicyName() string
GetPolicyName mocks base method.
func (*MockRateLimiter) GetRequestCounter ¶
func (m *MockRateLimiter) GetRequestCounter(labels map[string]string) prometheus.Counter
GetRequestCounter mocks base method.
func (*MockRateLimiter) GetSelectors ¶
func (m *MockRateLimiter) GetSelectors() []*languagev1.Selector
GetSelectors mocks base method.
func (*MockRateLimiter) Revert ¶
func (m *MockRateLimiter) Revert(labels map[string]string, decision *checkv1.LimiterDecision)
Revert mocks base method.
func (*MockRateLimiter) TakeIfAvailable ¶ added in v2.2.0
func (m *MockRateLimiter) TakeIfAvailable(labels map[string]string, count float64) (string, bool, float64, float64)
TakeIfAvailable mocks base method.
type MockRateLimiterMockRecorder ¶
type MockRateLimiterMockRecorder struct {
// contains filtered or unexported fields
}
MockRateLimiterMockRecorder is the mock recorder for MockRateLimiter.
func (*MockRateLimiterMockRecorder) Decide ¶
func (mr *MockRateLimiterMockRecorder) Decide(ctx, labels interface{}) *gomock.Call
Decide indicates an expected call of Decide.
func (*MockRateLimiterMockRecorder) GetLimiterID ¶
func (mr *MockRateLimiterMockRecorder) GetLimiterID() *gomock.Call
GetLimiterID indicates an expected call of GetLimiterID.
func (*MockRateLimiterMockRecorder) GetPolicyName ¶
func (mr *MockRateLimiterMockRecorder) GetPolicyName() *gomock.Call
GetPolicyName indicates an expected call of GetPolicyName.
func (*MockRateLimiterMockRecorder) GetRequestCounter ¶
func (mr *MockRateLimiterMockRecorder) GetRequestCounter(labels interface{}) *gomock.Call
GetRequestCounter indicates an expected call of GetRequestCounter.
func (*MockRateLimiterMockRecorder) GetSelectors ¶
func (mr *MockRateLimiterMockRecorder) GetSelectors() *gomock.Call
GetSelectors indicates an expected call of GetSelectors.
func (*MockRateLimiterMockRecorder) Revert ¶
func (mr *MockRateLimiterMockRecorder) Revert(labels, decision interface{}) *gomock.Call
Revert indicates an expected call of Revert.
func (*MockRateLimiterMockRecorder) TakeIfAvailable ¶ added in v2.2.0
func (mr *MockRateLimiterMockRecorder) TakeIfAvailable(labels, count interface{}) *gomock.Call
TakeIfAvailable indicates an expected call of TakeIfAvailable.
type MockScheduler ¶ added in v2.2.0
type MockScheduler struct {
// contains filtered or unexported fields
}
MockScheduler is a mock of Scheduler interface.
func NewMockScheduler ¶ added in v2.2.0
func NewMockScheduler(ctrl *gomock.Controller) *MockScheduler
NewMockScheduler creates a new mock instance.
func (*MockScheduler) Decide ¶ added in v2.2.0
func (m *MockScheduler) Decide(ctx context.Context, labels map[string]string) *checkv1.LimiterDecision
Decide mocks base method.
func (*MockScheduler) EXPECT ¶ added in v2.2.0
func (m *MockScheduler) EXPECT() *MockSchedulerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockScheduler) GetLatencyObserver ¶ added in v2.2.0
func (m *MockScheduler) GetLatencyObserver(labels map[string]string) prometheus.Observer
GetLatencyObserver mocks base method.
func (*MockScheduler) GetLimiterID ¶ added in v2.2.0
func (m *MockScheduler) GetLimiterID() iface.LimiterID
GetLimiterID mocks base method.
func (*MockScheduler) GetPolicyName ¶ added in v2.2.0
func (m *MockScheduler) GetPolicyName() string
GetPolicyName mocks base method.
func (*MockScheduler) GetRequestCounter ¶ added in v2.2.0
func (m *MockScheduler) GetRequestCounter(labels map[string]string) prometheus.Counter
GetRequestCounter mocks base method.
func (*MockScheduler) GetSelectors ¶ added in v2.2.0
func (m *MockScheduler) GetSelectors() []*languagev1.Selector
GetSelectors mocks base method.
func (*MockScheduler) Revert ¶ added in v2.2.0
func (m *MockScheduler) Revert(labels map[string]string, decision *checkv1.LimiterDecision)
Revert mocks base method.
type MockSchedulerMockRecorder ¶ added in v2.2.0
type MockSchedulerMockRecorder struct {
// contains filtered or unexported fields
}
MockSchedulerMockRecorder is the mock recorder for MockScheduler.
func (*MockSchedulerMockRecorder) Decide ¶ added in v2.2.0
func (mr *MockSchedulerMockRecorder) Decide(ctx, labels interface{}) *gomock.Call
Decide indicates an expected call of Decide.
func (*MockSchedulerMockRecorder) GetLatencyObserver ¶ added in v2.2.0
func (mr *MockSchedulerMockRecorder) GetLatencyObserver(labels interface{}) *gomock.Call
GetLatencyObserver indicates an expected call of GetLatencyObserver.
func (*MockSchedulerMockRecorder) GetLimiterID ¶ added in v2.2.0
func (mr *MockSchedulerMockRecorder) GetLimiterID() *gomock.Call
GetLimiterID indicates an expected call of GetLimiterID.
func (*MockSchedulerMockRecorder) GetPolicyName ¶ added in v2.2.0
func (mr *MockSchedulerMockRecorder) GetPolicyName() *gomock.Call
GetPolicyName indicates an expected call of GetPolicyName.
func (*MockSchedulerMockRecorder) GetRequestCounter ¶ added in v2.2.0
func (mr *MockSchedulerMockRecorder) GetRequestCounter(labels interface{}) *gomock.Call
GetRequestCounter indicates an expected call of GetRequestCounter.
func (*MockSchedulerMockRecorder) GetSelectors ¶ added in v2.2.0
func (mr *MockSchedulerMockRecorder) GetSelectors() *gomock.Call
GetSelectors indicates an expected call of GetSelectors.
func (*MockSchedulerMockRecorder) Revert ¶ added in v2.2.0
func (mr *MockSchedulerMockRecorder) Revert(labels, decision interface{}) *gomock.Call
Revert indicates an expected call of Revert.