DVMeterDefinition class

A meter: the name usage is counted under, and what bounds it.

Built once per meter, normally by the generated client from an @DVMeter declaration.

Constructors

DVMeterDefinition(String name, {required String unit, DVMeterKind kind = DVMeterKind.counter, DVLimit? limit, DVQuota? atLimit, List<double> notifyAt = const <double>[], Duration? grace, DVGaugeBilling gaugeBilling = DVGaugeBilling.average})

Properties

atLimit → DVQuota?
final
gaugeBilling → DVGaugeBilling
final
grace → Duration?
How long after its period closes a late record is still accepted into it. Null takes DVMeters.grace.
final
hashCode → int
The hash code for this object.
no setterinherited
kind → DVMeterKind
final
limit → DVLimit?
final
name → String
final
notifyAt → List<double>
Fractions of the limit announced when a recording crosses them.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unit → String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
record(num amount, {String? idempotencyKey, DateTime? at}) → Future<DVMeterOutcome>
Records amount through the configured DVMeters.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited