1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright Claudio Mattera 2021.
// Distributed under the MIT License.
// See accompanying file License.txt, or online at
// https://opensource.org/licenses/MIT

//! Rust InfluxDB Library
//! ====
//!
//! A library for querying and sending data to InfluxDB.
//!
//! <https://gitlab.com/claudiomattera/rinfluxdb>


pub mod flux;
pub mod influxql;
pub mod line_protocol;
pub mod types;


pub mod dataframe;

#[cfg(feature = "client")]
/// A client for performing frequent Flux queries in a convenient way
pub type FluxClient = flux::blocking::Client;

#[cfg(feature = "client")]
/// A client for performing frequent asynchronous Flux queries in a convenient way
pub type FluxAsyncClient = flux::r#async::Client;

/// A Flux query
pub type FluxQuery = flux::Query;

/// A builder for Flux queries
pub type FluxQueryBuilder = flux::QueryBuilder;

#[cfg(feature = "client")]
/// A client for performing frequent InfluxQL queries in a convenient way
pub type InfluxqlClient = influxql::blocking::Client;

#[cfg(feature = "client")]
/// A client for performing frequent asynchronous InfluxQL queries in a convenient way
pub type InfluxqlAsyncClient = influxql::r#async::Client;

/// An InfluxQL query
pub type InfluxqlQuery = influxql::Query;

/// A builder for InfluxQL queries
pub type InfluxqlQueryBuilder = influxql::QueryBuilder;

#[cfg(feature = "client")]
/// A client for sending data with Influx Line Protocol queries in a convenient
/// way
pub type InfluxLineClient = line_protocol::blocking::Client;

#[cfg(feature = "client")]
/// A client for asynchronously sending data with Influx Line Protocol queries in a convenient
/// way
pub type InfluxAsyncLineClient = line_protocol::r#async::Client;

/// Represent a line in Influx Line Protocol
pub type InfluxLine = line_protocol::Line;

/// A builder for Influx Line Protocol lines
pub type InfluxLineBuilder = line_protocol::LineBuilder;