DVCrashIngest class
The backend's side of sink: dartvel: accepts a report, validates it,
limits it per install and per client source, and stores it.
Nothing a report carries is ever logged or answered, including when it is refused or cannot be stored. A report's message is whatever the error said, and a database error quotes the values it could not insert, so the store's error is logged by its type alone.
Constructors
- DVCrashIngest({required DVCrashReportRepository repository, int perInstallPerHour = 30, int? perSourcePerHour, int maxBytes = 262144, DateTime clock()?, void log(String line)?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxBytes → int
-
The largest body accepted.
final
- perInstallPerHour → int
-
Reports stored per install per hour; past it they are counted.
final
- perSourcePerHour → int
-
Reports stored per client source per hour; past it they are refused
with 429.
final
- repository → DVCrashReportRepository
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
accept(
List< int> body, {String source = DVClientAddress.unknownSource}) → Future<DVCrashIngestResult> -
Accepts one report sent from
source: the client's key asDVClientAddress.sourceOfgives it. A caller that passes none counts every such report in one unknown source, which is limited rather than left unlimited. -
limited(
String installId) → int -
How many of
installId's reports were counted rather than stored. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sourceLimited(
String source) → int -
How many reports from
sourcewere refused this hour for its budget. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- installsPerSource → const int
- How many installs behind one address the default per-source budget allows at their full per-install budget.
- path → const String
- Where the generated backend serves it, under the API base path.