append method
Future<void>
append(
- ArgosHttpInfo info, {
- int maxRecords = 200,
- int resourceMaxRecords = 50,
- String routeName = '',
Append a captured HTTP record. Trims oldest entries of the same kind when its per-kind cap is exceeded.
Returns the op future so a caller (e.g. a test) can await this specific write's effect on the cache — not its eventual disk flush.
Implementation
Future<void> append(ArgosHttpInfo info,
{int maxRecords = 200,
int resourceMaxRecords = 50,
String routeName = ''}) {
final json = info.toJson();
json['routeName'] = routeName;
final record = ArgosPacketRecord.fromJson(json);
return _enqueueWrite(record.toJson(), maxRecords, resourceMaxRecords);
}