# #SDK #基础设施 #API绑定 #aiven

aiven_rs

这是一个与aiven-cloud API交互的Rust SDK

8个不稳定版本 (3个重大变更)

0.4.1 2021年1月11日
0.4.0 2021年1月8日
0.3.0 2020年10月17日
0.2.3 2020年9月1日
0.1.0 2020年4月17日

#597 in 异步

每月26次下载

MIT许可证

435KB
8K SLoC

aiven-rs

Aiven的异步Rust SDK

rust aiven

Linux Crates.io Docs.rs codecov


资源

入门

// tokio = "1.0"
// aiven_rs = "0.4.0"

use aiven_rs::{cloud::types::ResClouds, AivenClient};

#[tokio::main]
async fn main() {
  env_logger::init();
  // use std::env;
  //
  // let token = env::var("AIVEN_TOKEN").expect("Please set env variable to read AIVEN_TOKEN");
  // let client = AivenClient::from_token("https://api.aiven.io", "v1", &token);

  let client = AivenClient::new("https://api.aiven.io", "v1");
  let cloud_api = client.cloud();
  let output: ResClouds = cloud_api.list_all().await.unwrap();
  for cloud in &output.clouds {
    println!("{:?}", cloud.cloud_name);
  }
}

运行示例

RUST_LOG=aiven_rs=debug cargo run --example clouds

许可证

本项目采用

依赖

~9–24MB
~367K SLoC