* feat: create namespace API call in router Co-authored-by: Nga Tran <nga-tran@live.com> * chore: treat retention as ns except in CLI * fix: overflow in nanosecond calc * fix: retention test after changing it from hours to ns * chore: comment clarification in cli; better response type for error in ns API * fix: correct some rebase mistakes * chore: merge namespace create & create_with_retention; renamed ns create test helper fn & const * fix: ns autocreation test was wrong after rebase * fix: mem catalog has default 1hr retention, accidently removed in rebase * chore: remove mem catalogs default 1hr retention; make it settable in sets & router Co-authored-by: Luke Bond <luke.n.bond@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
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");
}
}