writeLineProtocol method
Future<void>
writeLineProtocol(
- String record, {
- String? bucket,
- String? org,
- WritePrecision precision = WritePrecision.ns,
Write line protocol string record
into bucket
and org
Implementation
Future<void> writeLineProtocol(String record,
{String? bucket,
String? org,
WritePrecision precision = WritePrecision.ns}) async {
if (writeOptions!.maxRetries > 0) {
var retry = RetryOptions(
exponentialBase: writeOptions!.exponentialBase,
retryInterval: Duration(milliseconds: writeOptions!.retryInterval),
maxDelay: Duration(milliseconds: writeOptions!.maxRetryDelay),
maxTime: Duration(milliseconds: writeOptions!.maxRetryTime),
maxRetries: writeOptions!.maxRetries,
retryJitter: Duration(milliseconds: writeOptions!.retryJitter),
);
return retry.retry(
() => _write(record, bucket: bucket, org: org, precision: precision),
retryIf: (e) => retry.isRetryable(e));
} else {
await _write(record, bucket: bucket, org: org, precision: precision);
}
}