rcfe

Crates.iorcfe
lib.rsrcfe
version0.1.2
created_at2025-11-17 10:33:07.137689+00
updated_at2025-11-24 06:42:39.438864+00
descriptionAn asynchronous etcd v3 client library for Rust built on gRPC.
homepagehttps://github.com/hipeday/rcfe
repositoryhttps://github.com/hipeday/rcfe
max_upload_size
id1936573
size36,989
Jixon (Jixiangup)

documentation

https://docs.rs/rcfe

README

RCFE - Rust Client for ETCD V3.

RCFE is a Rust client library for interacting with ETCD V3, a distributed key-value store that provides a reliable way to store data across a cluster of machines. This library aims to provide a simple and efficient interface for Rust developers to work with ETCD.

The name "RCFE" stands for "Rust Client for ETCD".

[!WARNING] This project is still in its early stages of development. APIs may change without notice. Use at your own risk.

Features

  • Async/Await support using Tokio
  • Basic KV operations (get, put, delete, transactions)
    • Range Get
    • Put
    • Delete
    • Transactions
    • Compact
  • Lease management
    • Grant lease
    • Revoke lease
    • Keep-alive lease
  • Watch functionality
  • Authentication support
  • TLS support
  • Comprehensive error handling
  • Documentation and examples

Usage

Add the following to your Cargo.toml:

[dependencies]
rcfe = "<version>"

Replace <version> with the latest version of RCFE.

Or use the following command:

cargo add rcfe

Here is a simple example of how to use RCFE to connect to an ETCD server and perform a basic key-value operation:

use rcfe::{ClientFactory, DefaultClient, Error};

#[tokio::main]
async fn main() -> Result<(), Error> {
  let client_options = rcfe::ClientOptions::builder()
          .endpoints(vec!["http://localhost:2379"])
          .build();

  let client = rcfe::DefaultClientFactory::new().create(client_options).await?;
  
  // Get the KV client
  let mut kv_client = client.kv_client();
  
  // Get a value by key
  let response = kv_client.get(ByteSequence::from("greeting")).await?;
  
  println!("Received response: {:?}", response);
  
  Ok(())
}
Commit count: 0

cargo fmt