leekeiabstraction commented on code in PR #2462:
URL: https://github.com/apache/fluss/pull/2462#discussion_r2724004863
##########
website/docs/apis/rust-client.md:
##########
@@ -0,0 +1,243 @@
+---
+title: "Rust Client"
+sidebar_position: 3
+---
+
+# Fluss Rust Client
+
+## Overview
+The Fluss Rust Client provides an interface for interacting with Fluss
clusters. It supports asynchronous operations for managing resources and
handling data.
+
+The client provides two main APIs:
+* **Admin API**: For managing databases, tables, partitions, and retrieving
metadata.
+* **Table API**: For reading from and writing to Fluss tables.
+
+## Installation
+To use the Fluss Rust client, add the following dependency to your
`Cargo.toml` file:
+
+```toml
+[dependencies]
+fluss-client = "0.6.0" # Replace with the latest version
Review Comment:
Can you confirm if this is currently available publicly?
##########
website/docs/apis/rust-client.md:
##########
@@ -0,0 +1,243 @@
+---
+title: "Rust Client"
+sidebar_position: 3
+---
+
+# Fluss Rust Client
+
+## Overview
+The Fluss Rust Client provides an interface for interacting with Fluss
clusters. It supports asynchronous operations for managing resources and
handling data.
+
+The client provides two main APIs:
+* **Admin API**: For managing databases, tables, partitions, and retrieving
metadata.
+* **Table API**: For reading from and writing to Fluss tables.
+
+## Installation
+To use the Fluss Rust client, add the following dependency to your
`Cargo.toml` file:
+
+```toml
+[dependencies]
+fluss-client = "0.6.0" # Replace with the latest version
+tokio = { version = "1", features = ["full"] }
+```
+
+## Initialization
+
+The `Connection` object is the entry point for interacting with Fluss. It is
created using `Connection::create()` and requires a `Configuration` object.
+
+The `Connection` object is thread-safe and can be shared across multiple
tasks. It is recommended to create a single `Connection` instance per
application and use it to create multiple `Admin` and `Table` instances.
+
+```rust
+use fluss_client::Connection;
+use fluss_client::config::Configuration;
+use fluss_client::admin::Admin;
+
+#[tokio::main]
+async fn main() -> Result<(), Box<dyn std::error::Error>> {
+ // Create configuration
+ let mut conf = Configuration::default();
+ conf.set_string("bootstrap.servers", "localhost:9123");
+
+ // Create connection
+ let connection = Connection::create(conf).await?;
+
+ // Obtain Admin instance
+ let admin = connection.get_admin();
+ let databases = admin.list_databases().await?;
+ println!("Databases: {:?}", databases);
+
+ Ok(())
+}
+```
+
+### SASL Authentication
+If your Fluss cluster uses SASL authentication, configure the security
properties:
+
+```rust
+ let mut conf = Configuration::default();
+ conf.set_string("bootstrap.servers", "localhost:9123");
+ conf.set_string("client.security.protocol", "sasl");
+ conf.set_string("client.security.sasl.mechanism", "PLAIN");
+ conf.set_string("client.security.sasl.username", "alice");
+ conf.set_string("client.security.sasl.password", "alice-secret");
Review Comment:
Are these currently honoured?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]