/*!
# InfluxDB Client Library
## About this crate
### What this crate provides
- Support for InfluxDB 2.x.
- Backlog storage of Record's on failure to commit due to connectivity or configuration issues.
- Build-in compression of requests.
### What it does not provide
- Support for InfluxDB 1.x
### What is on the roadmap
- Support for async/await as a feature. [#3](https://github.com/voipir/rust-influxc/issues/3)
- Reduction of dependencies by switching the underlying reqwest library with hyper. [#4](https://github.com/voipir/rust-influxc/issues/4)
- Support for sending, processing responses to queries. [#5](https://github.com/voipir/rust-influxc/issues/5)
- Support for mapping native types to query response data like sqlx. [#6](https://github.com/voipir/rust-influxc/issues/6)
## Basic Usage
```rust
use influxc::Client;
use influxc::FileBacklog;
use influxc::Record;
use influxc::Precision;
use influxc::Credentials;
use influxc::InfluxError;
use std::time::Duration;
use std::thread::sleep;
fn main() -> Result<(), InfluxError>
{
let creds = Credentials::from_basic("testuser", "testpasswd");
let backlog = FileBacklog::new("./ignore/backlog")?;
let mut client = Client::build("http://127.0.0.1:8086".into(), creds)
.backlog(backlog)
.finish()?;
let mut rec = Record::new("org", "bucket")
.precision(Precision::Milliseconds);
loop
{
rec.measurement("sensor1")
.tag("floor", "second")
.tag("exposure", "west")
.field("temp", 123)
.field("brightness", 500);
rec.measurement("sensor2")
.tag("floor", "second")
.tag("exposure", "east")
.field("temp", 321)
.field("brightness", 999);
if let Err(e) = client.write(&rec) {
eprintln!("{}", e);
}
sleep(Duration::from_secs(1));
}
}
```
*/
// Imports
extern crate log;
extern crate serde;
use Deserialize;
use GzBuilder as FlateGzipBuilder;
use Compression as FlateLevel;
use serde_json as json;
use Error as JsonError;
use base32 as b32;
use base64 as b64;
use Url as ReqwUrl;
use Error as ReqwError;
use Method as ReqwMethod;
use Client as ReqwClient;
use RequestBuilder as ReqwRequestBuilder;
type Utc = Utc;
type DateTime = DateTime;
// Internals/Exports
use InfluxResult;
use InfluxErrorAnnotate;
use ApiDelayError;
use ApiGenericError;
use ApiOversizeError;
use ApiMalformationError;
pub use Credentials;
pub use InfluxError;
pub use Value;
pub use Client;
pub use Record;
pub use ClientBuilder;
pub use Precision;
pub use Backlog;
pub use FileBacklog;
pub use NoopBacklog;
pub use Measurement;