TrafficView class

Constructors

TrafficView({int? blind, List<TrafficCaller> callers = const [], int? ceiling, int? denied, Map<String, int> lanes = const {}, String? mode, String? org, int? refused, int? requests, int? screens, String? strain, int? tracked, int? unscored, int? windowSec})
Returns a new TrafficView instance.

Properties

blind ↔ int?
Blind is how many requests in the window carried no identity to attribute them to — no validated credential and no client address. Non-zero on a public plane means the client address is not reaching this process (a TCP load balancer with no PROXY protocol in front of it, typically), so this scope's callers cannot be told apart and nothing can be held against them.
getter/setter pair
callers ↔ List<TrafficCaller>
Callers is the scope's busiest callers this window. A credentialed caller appears as a FINGERPRINT — a per-process one-way digest: enough to recognise the same caller across requests, never enough to reconstruct the credential.
getter/setter pair
ceiling ↔ int?
Ceiling is the most callers this scope may hold at once.
getter/setter pair
denied ↔ int?
Denied is how many of them the gate refused.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
lanes ↔ Map<String, int>
Lanes is the request count per lane — agent, human, bot, unknown. This is the split that separates a customer's automation from a scraper.
getter/setter pair
mode ↔ String?
Mode is the abuse gate's posture for this scope: "shadow" records the scorer's action without enforcing it, "live" enforces it.
getter/setter pair
org ↔ String?
Org is the scope this view was taken for — the validated principal's own, never a value the caller supplied. Empty names the anonymous lane, the one scope that has no tenant.
getter/setter pair
refused ↔ int?
Refused is how many callers this scope's ceilings turned away in the window.
getter/setter pair
requests ↔ int?
Requests is how many requests this scope made in the window.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screens ↔ int?
Screens is how many of them were put to the scorer — the billable unit of the risk product. Counted from the first request, whatever the SKU costs.
getter/setter pair
strain ↔ String?
Strain is what this scope's ceilings are doing: "clear" below them, "full" at them, "refuse" once a caller has been turned away inside this window — which means that caller is UNMEASURED and the numbers here are a sample rather than a census. It is reported rather than logged because the alternative — a bound that degrades a scope silently — is the failure this design exists to rule out. No other scope can move it.
getter/setter pair
tracked ↔ int?
Tracked is how many callers this scope holds state for right now, and Ceiling is the most it may hold. Tracked == Ceiling is the fact a bound that binds cannot hide.
getter/setter pair
unscored ↔ int?
Unscored is how many of those screens got NO answer — the scorer was absent, stuck, slow, erroring or silent. An unanswered screen allows ordinary traffic, so this is the number that separates "a quiet day" from "the judge stopped answering and nothing said so".
getter/setter pair
windowSec ↔ int?
WindowSec is the span the counts cover, in seconds.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(dynamic value) → TrafficView?
Returns a new TrafficView instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<TrafficView>
mapFromJson(dynamic json) → Map<String, TrafficView>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<TrafficView>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.