Crate influxive_child_svc

Source
Expand description

Run influxd as a child process.

§Example

use influxive_core::Metric;
use influxive_child_svc::*;

let tmp = tempfile::tempdir().unwrap();

let influxive = InfluxiveChildSvc::new(
    InfluxiveChildSvcConfig::default()
        .with_database_path(Some(tmp.path().to_owned())),
).await.unwrap();

influxive.write_metric(
    Metric::new(
        std::time::SystemTime::now(),
        "my.metric",
    )
    .with_field("value", 3.14)
    .with_tag("tag", "test-tag")
);

Structs§

InfluxiveChildSvc
A running child-process instance of influxd. Command and control functions are provided through the influx cli tool. Metric writing is provided through the http line protocol.
InfluxiveChildSvcConfig
Configure the child process.
InfluxiveWriterConfig
InfluxDB metric writer configuration.