pub trait MetricWriter:
'static
+ Send
+ Sync {
// Required method
fn write_metric(&self, metric: Metric);
}
Expand description
Indicates a type that is capable of writing metrics to an InfluxDB instance.
Required Methods§
Sourcefn write_metric(&self, metric: Metric)
fn write_metric(&self, metric: Metric)
Write a metric to an InfluxDB instance. Note, this should return immediately, perhaps by adding the metric to a memory buffer for a different process/task/thread to actually write the metric as determined by the concrete implementation.