|
30 | 30 | </a> |
31 | 31 | </p> |
32 | 32 |
|
33 | | -This library is a work in progress. This means a feature you might need is not implemented |
34 | | -yet or could be handled better. |
| 33 | +This library is a work in progress. This means a feature you might need is not implemented yet or could be handled better. |
| 34 | + |
| 35 | +Pull requests are always welcome. See [Contributing][__link0] and [Code of Conduct][__link1]. For a list of past changes, see [CHANGELOG.md][__link2]. |
35 | 36 |
|
36 | | -Pull requests are always welcome. See [Contributing](https://github.com/influxdb-rs/influxdb-rust/blob/main/CONTRIBUTING.md) and [Code of Conduct](https://github.com/influxdb-rs/influxdb-rust/blob/main/CODE_OF_CONDUCT.md). For a list of past changes, see [CHANGELOG.md](https://github.com/influxdb-rs/influxdb-rust/blob/main/CHANGELOG.md). |
37 | 37 |
|
38 | 38 | ### Currently Supported Features |
39 | 39 |
|
40 | | -- Reading and Writing to InfluxDB |
41 | | -- Optional Serde Support for Deserialization |
42 | | -- Running multiple queries in one request (e.g. `SELECT * FROM weather_berlin; SELECT * FROM weather_london`) |
43 | | -- Writing single or multiple measurements in one request (e.g. `WriteQuery` or `Vec<WriteQuery>` argument) |
44 | | -- Authenticated and Unauthenticated Connections |
45 | | -- `async`/`await` support |
46 | | -- `#[derive(InfluxDbWriteable)]` Derive Macro for Writing / Reading into Structs |
47 | | -- `GROUP BY` support |
48 | | -- Tokio and async-std support (see example below) or [available backends](https://github.com/influxdb-rs/influxdb-rust/blob/main/influxdb/Cargo.toml) |
49 | | -- Swappable HTTP backends ([see below](#Choice-of-HTTP-backend)) |
| 40 | + - Reading and Writing to InfluxDB |
| 41 | + - Optional Serde Support for Deserialization |
| 42 | + - Running multiple queries in one request (e.g. `SELECT * FROM weather_berlin; SELECT * FROM weather_london`) |
| 43 | + - Writing single or multiple measurements in one request (e.g. `WriteQuery` or `Vec<WriteQuery>` argument) |
| 44 | + - Authenticated and Unauthenticated Connections |
| 45 | + - `async`/`await` support |
| 46 | + - `#[derive(InfluxDbWriteable)]` Derive Macro for Writing / Reading into Structs |
| 47 | + - `GROUP BY` support |
| 48 | + - Tokio and async-std support (see example below) or [available backends][__link3] |
| 49 | + - Swappable HTTP backends ([see below](#Choice-of-HTTP-backend)) |
| 50 | + |
50 | 51 |
|
51 | 52 | ## Quickstart |
52 | 53 |
|
53 | 54 | Add the following to your `Cargo.toml` |
54 | 55 |
|
| 56 | + |
55 | 57 | ```toml |
56 | | -influxdb = { version = "0.6", features = ["derive"] } |
| 58 | +influxdb = { version = "0.6.0", features = ["derive"] } |
57 | 59 | ``` |
58 | 60 |
|
59 | | -For an example with using Serde deserialization, please refer to [serde_integration](crate::integrations::serde_integration) |
| 61 | +For an example with using Serde deserialization, please refer to [serde_integration][__link4] |
| 62 | + |
60 | 63 |
|
61 | 64 | ```rust |
62 | 65 | use influxdb::{Client, Query, Timestamp, ReadQuery}; |
@@ -104,46 +107,82 @@ async fn main() { |
104 | 107 | } |
105 | 108 | ``` |
106 | 109 |
|
107 | | -For further examples, check out the Integration Tests in `tests/integration_tests.rs` |
108 | | -in the repository. |
| 110 | +For further examples, check out the Integration Tests in `tests/integration_tests.rs` in the repository. |
| 111 | + |
109 | 112 |
|
110 | 113 | ## Choice of HTTP backend |
111 | 114 |
|
112 | 115 | To communicate with InfluxDB, you can choose the HTTP backend to be used configuring the appropriate feature. We recommend sticking with the default reqwest-based client, unless you really need async-std compatibility. |
113 | 116 |
|
114 | | -- **[hyper](https://github.com/hyperium/hyper)** (through reqwest, used by default), with [rustls](https://github.com/ctz/rustls) |
115 | | - ```toml |
116 | | - influxdb = { version = "0.6", features = ["derive"] } |
117 | | - ``` |
118 | | - |
119 | | -- **[hyper](https://github.com/hyperium/hyper)** (through reqwest), with native TLS (OpenSSL) |
120 | | - ```toml |
121 | | - influxdb = { version = "0.6", default-features = false, features = ["derive", "use-serde", "reqwest-client"] } |
122 | | - ``` |
123 | | - |
124 | | -- **[hyper](https://github.com/hyperium/hyper)** (through surf), use this if you need tokio 0.2 compatibility |
125 | | - ```toml |
126 | | - influxdb = { version = "0.6", default-features = false, features = ["derive", "use-serde", "curl-client"] } |
127 | | - ``` |
128 | | -- **[curl](https://github.com/alexcrichton/curl-rust)**, using [libcurl](https://curl.se/libcurl/) |
129 | | - ```toml |
130 | | - influxdb = { version = "0.6", default-features = false, features = ["derive", "use-serde", "curl-client"] } |
131 | | - ``` |
132 | | -- **[async-h1](https://github.com/http-rs/async-h1)** with native TLS (OpenSSL) |
133 | | - ```toml |
134 | | - influxdb = { version = "0.6", default-features = false, features = ["derive", "use-serde", "h1-client"] } |
135 | | - ``` |
136 | | -- **[async-h1](https://github.com/http-rs/async-h1)** with [rustls](https://github.com/ctz/rustls) |
137 | | - ```toml |
138 | | - influxdb = { version = "0.6", default-features = false, features = ["derive", "use-serde", "h1-client-rustls"] } |
139 | | - ``` |
140 | | -- WebAssembly's `window.fetch`, via `web-sys` and **[wasm-bindgen](https://github.com/rustwasm/wasm-bindgen)** |
141 | | - ```toml |
142 | | - influxdb = { version = "0.6", default-features = false, features = ["derive", "use-serde", "wasm-client"] } |
143 | | - ``` |
| 117 | + - **[hyper][__link5]** (through reqwest, used by default), with [rustls][__link6] |
| 118 | + ```toml |
| 119 | + influxdb = { version = "0.6.0", features = ["derive"] } |
| 120 | + ``` |
| 121 | + |
| 122 | + |
| 123 | + - **[hyper][__link7]** (through reqwest), with native TLS (OpenSSL) |
| 124 | + ```toml |
| 125 | + influxdb = { version = "0.6.0", default-features = false,features = ["derive", "use-serde", "reqwest-client"] } |
| 126 | + ``` |
| 127 | + |
| 128 | + |
| 129 | + - **[hyper][__link8]** (through surf), use this if you need tokio 0.2 compatibility |
| 130 | + ```toml |
| 131 | + influxdb = { version = "0.6.0", default-features = false,features = ["derive", "use-serde", "hyper-client"] } |
| 132 | + ``` |
| 133 | + |
| 134 | + |
| 135 | + - **[curl][__link9]**, using [libcurl][__link10] |
| 136 | + ```toml |
| 137 | + influxdb = { version = "0.6.0", default-features = false,features = ["derive", "use-serde", "curl-client"] } |
| 138 | + ``` |
| 139 | + |
| 140 | + |
| 141 | + - **[async-h1][__link11]** with native TLS (OpenSSL) |
| 142 | + ```toml |
| 143 | + influxdb = { version = "0.6.0", default-features = false,features = ["derive", "use-serde", "h1-client"] } |
| 144 | + ``` |
| 145 | + |
| 146 | + |
| 147 | + - **[async-h1][__link12]** with [rustls][__link13] |
| 148 | + ```toml |
| 149 | + influxdb = { version = "0.6.0", default-features = false,features = ["derive", "use-serde", "h1-client-rustls"] } |
| 150 | + ``` |
| 151 | + |
| 152 | + |
| 153 | + - WebAssembly’s `window.fetch`, via `web-sys` and **[wasm-bindgen][__link14]** |
| 154 | + ```toml |
| 155 | + influxdb = { version = "0.6.0", default-features = false,features = ["derive", "use-serde", "wasm-client"] } |
| 156 | + ``` |
| 157 | + |
| 158 | + |
| 159 | + |
144 | 160 |
|
145 | 161 | ## License |
146 | 162 |
|
147 | | -[](https://opensource.org/licenses/MIT) |
| 163 | +[![License: MIT][__link15]][__link16] |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | +@ 2020 Gero Gerke and [contributors]. |
| 168 | + |
| 169 | + [contributors]: https://github.com/influxdb-rs/influxdb-rust/graphs/contributors |
| 170 | + [__cargo_doc2readme_dependencies_info]: ggGkYW0BYXSEG-eS3ZnLalPKG8RSyE7OgxOuG5N_7FO9S6I9G5Bq0rFyX93cYXKEGyBiJeIUzlcaG-d2lJz85cl_G-crYZ-mhyAvG6Wf1YbqYiItYWSBgmhpbmZsdXhkYmUwLjYuMA |
| 171 | + [__link0]: https://github.com/influxdb-rs/influxdb-rust/blob/main/CONTRIBUTING.md |
| 172 | + [__link1]: https://github.com/influxdb-rs/influxdb-rust/blob/main/CODE_OF_CONDUCT.md |
| 173 | + [__link10]: https://curl.se/libcurl/ |
| 174 | + [__link11]: https://github.com/http-rs/async-h1 |
| 175 | + [__link12]: https://github.com/http-rs/async-h1 |
| 176 | + [__link13]: https://github.com/ctz/rustls |
| 177 | + [__link14]: https://github.com/rustwasm/wasm-bindgen |
| 178 | + [__link15]: https://img.shields.io/badge/License-MIT-yellow.svg |
| 179 | + [__link16]: https://opensource.org/licenses/MIT |
| 180 | + [__link2]: https://github.com/influxdb-rs/influxdb-rust/blob/main/CHANGELOG.md |
| 181 | + [__link3]: https://github.com/influxdb-rs/influxdb-rust/blob/main/influxdb/Cargo.toml |
| 182 | + [__link4]: https://docs.rs/influxdb/0.6.0/influxdb/?search=integrations::serde_integration |
| 183 | + [__link5]: https://github.com/hyperium/hyper |
| 184 | + [__link6]: https://github.com/ctz/rustls |
| 185 | + [__link7]: https://github.com/hyperium/hyper |
| 186 | + [__link8]: https://github.com/hyperium/hyper |
| 187 | + [__link9]: https://github.com/alexcrichton/curl-rust |
148 | 188 |
|
149 | | -@ 2020 Gero Gerke and [contributors](https://github.com/influxdb-rs/influxdb-rust/graphs/contributors). |
|
0 commit comments