Browse Source

impl Clone for InfluxWriter

master
Jonathan Strong 6 years ago
parent
commit
f74de77ae8
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      src/influx.rs

+ 13
- 0
src/influx.rs View File

@@ -187,6 +187,19 @@ impl Default for InfluxWriter {
}
}

impl Clone for InfluxWriter {
fn clone(&self) -> Self {
let (tx, _) = channel();
InfluxWriter {
host: self.host,
db: self.db,
tx: self.tx.clone(),
kill_switch: tx,
thread: None,
}
}
}

impl InfluxWriter {
/// Sends the `OwnedMeasurement` to the serialization thread.
///


Loading…
Cancel
Save