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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
//! # InfluxDB Client
//! InfluxDB is an open source time series database with no external dependencies.
//! It's useful for recording metrics, events, and performing analytics.
//!
//! ## Usage
//!
//! ### http
//!
//! ```rust,no_run
//! # #[cfg(feature = "reqwest")] {
//! use influx_db_client::{Client, Point, Points, Precision, point, points};
//!
//! // default with "http://127.0.0.1:8086", db with "test"
//! let client = Client::default().set_authentication("root", "root");
//!
//! let point = point!("test1")
//! .add_field("foo", "bar")
//! .add_field("integer", 11)
//! .add_field("float", 22.3)
//! .add_field("'boolean'", false);
//!
//! let point1 = Point::new("test1")
//! .add_tag("tags", "\\\"fda")
//! .add_tag("number", 12)
//! .add_tag("float", 12.6)
//! .add_field("fd", "'3'")
//! .add_field("quto", "\\\"fda")
//! .add_field("quto1", "\"fda");
//!
//! let points = points!(point1, point);
//!
//! tokio::runtime::Runtime::new().unwrap().block_on(async move {
//! // if Precision is None, the default is nanosecond
//! // Multiple write
//! client.write_points(points, Some(Precision::Seconds), None).await.unwrap();
//!
//! // query, it's type is Option<Vec<Node>>
//! let res = client.query("select * from test1", None).await.unwrap();
//! println!("{:?}", res.unwrap()[0].series);
//! });
//! # }
//! ```
//!
//! `Client` defaults to `reqwest::Client` when the default `reqwest` feature is enabled,
//! but it is generic over the HTTP implementation.
//! Implement the transport traits for the APIs you want to support, then plug the transport into
//! [`Client::new_with_client`]. Borrowing APIs such as [`Client::ping_borrow`],
//! [`Client::get_version_borrow`], [`Client::query_borrow`], [`Client::query_chunked_borrow`],
//! [`Client::write_point_borrow`], and [`Client::write_points_borrow`] require [`BorrowHttpClient`]
//! and [`BorrowHttpResponse`]. Borrowed chunked queries also require
//! [`BorrowChunkedHttpResponse`]. Spawn-safe APIs such as [`Client::ping`],
//! [`Client::get_version`], [`Client::query`], [`Client::query_chunked`],
//! [`Client::write_point`], and [`Client::write_points`] plus the query-backed management
//! commands require [`HttpClient`] and [`HttpResponse`]. Spawn-safe chunked queries also require
//! [`ChunkedHttpResponse`]. You can implement borrowed-only, spawn-safe-only, or both modes on
//! the same transport type.
//! Borrowing APIs pass borrowed [`HttpRequest`] data through the borrow transport traits, while
//! the spawnable query/write APIs pass owned `HttpRequest<'static>` values.
//! Chunked responses now yield an async byte stream instead of a blocking reader.
//! Disable default features if you want to avoid compiling `reqwest` and provide your own
//! HTTP client.
//! The default `reqwest/default-tls` path currently resolves to rustls.
//! This is an incompatible feature-name update: the previous `rustls-tls*` feature names were
//! removed. Disable default features and enable `native-tls` to use reqwest's native-tls backend.
//! On Linux that typically means OpenSSL; on macOS and Windows it uses the platform TLS stack.
//!
//! `query_chunked` is also an incompatible change now: it returns an async [`futures::Stream`]
//! instead of a synchronous iterator. Import `futures::StreamExt` to consume it with
//! `.next().await`.
//!
//! ```rust,compile_fail
//! use influx_db_client::{
//! QueryChunkedHttpResponse, QueryHttpClient, QueryHttpResponse, WriteHttpClient,
//! };
//! ```
//!
//! ### udp
//!
//! ```rust,no_run
//! use influx_db_client::{Point, UdpClient, point};
//!
//! let mut udp = UdpClient::new("127.0.0.1:8089".parse().unwrap());
//! udp.add_host("127.0.0.1:8090".parse().unwrap());
//!
//! let point = point!("test").add_field("foo", "bar");
//!
//! udp.write_point(point).unwrap();
//! ```
/// All API on influxdb client, Including udp, http
/// Error module
/// HTTP transport abstraction types and traits.
/// Points and Query Data Deserialize
/// Serialization module
pub
pub use ;
pub use Error;
pub use ;
pub use ;
pub use Url;
pub use reqwest;