1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00
unleash.unleash/src/lib/features/feature-toggle/fake-feature-strategies-read-model.ts
Thomas Heartman c4e2159401
chore: add metrics/gauges for "max constraint values" and "max constraints" (#7398)
This PR adds metrics tracking for:
- "maxConstraintValues": the highest number of constraint values that
are in use
- "maxConstraintsPerStrategy": the highest number of constraints used on
a strategy

It updates the existing feature strategy read model that returns max
metrics for other strategy-related things.

It also moves one test into a more fitting describe block.
2024-06-17 11:13:13 +02:00

37 lines
844 B
TypeScript

import type { IFeatureStrategiesReadModel } from './types/feature-strategies-read-model-type';
export class FakeFeatureStrategiesReadModel
implements IFeatureStrategiesReadModel
{
async getMaxFeatureEnvironmentStrategies(): Promise<{
feature: string;
environment: string;
count: number;
} | null> {
return null;
}
async getMaxFeatureStrategies(): Promise<{
feature: string;
count: number;
} | null> {
return null;
}
async getMaxConstraintValues(): Promise<{
feature: string;
environment: string;
count: number;
} | null> {
return null;
}
async getMaxConstraintsPerStrategy(): Promise<{
feature: string;
environment: string;
count: number;
} | null> {
return null;
}
}