influxdb/influxdb_iox_client
dependabot[bot] b49cc2e35e
chore(deps): Bump tokio from 1.24.0 to 1.24.1 (#6545)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.0 to 1.24.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.24.0...tokio-1.24.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-01-10 09:48:44 +00:00
..
src refactor: Make arrow flight client return `futures::Streams` (#6438) 2022-12-19 17:09:26 +00:00
Cargo.toml chore(deps): Bump tokio from 1.24.0 to 1.24.1 (#6545) 2023-01-10 09:48:44 +00:00
README.md docs: Readability improvements (#4946) 2022-06-27 21:46:18 +00:00

README.md

InfluxDB IOx Client

This is the official Rust client library for connecting to InfluxDB IOx.

Currently only gRPC is supported.

Using the gRPC Write Client

To write to IOx, create a connection and a write client, and then send line protocol. Here is an example of creating an instance that connects to an IOx server running at http://127.0.0.1:8081 (the default bind address for the gRPC endpoint of IOx when running in all-in-one mode) and sending a line of line protocol:

#[tokio::main]
fn main() {
    use influxdb_iox_client::{
        write::Client,
        connection::Builder,
    };

    let mut connection = Builder::default()
        .build("http://127.0.0.1:8081")
        .await
        .unwrap();

    let mut client = Client::new(connection);

    // write a line of line protocol data
    client
        .write_lp("bananas", "cpu,region=west user=23.2 100",0)
        .await
        .expect("failed to write to IOx");
    }
}