#api #cloud #api-bindings #jelastic #jelastic-api #hidora

jelastic-rs

Rust对Jelastic API的封装

1 个不稳定版本

0.1.0 2022年6月1日

#1672异步

自定义许可证

15KB
61

对Jelastic API的Rust封装。

安装

Cargo.toml 中设置 jelastic-rs 依赖项(参见crates.io上的最新版本)

...

[dependencies]
jelastic-rs = "0.1.0"

使用

use jelastic_rs;

#[tokio::main]
async fn main() {
    let jelastic_api = jelastic_rs::Api {
        host: String::from("<JELASTIC API HOST>"),
        token: String::from("<YOUR JELASTIC API TOKEN>"),
    };

    match jelastic_api.start_env("my-env").await {
        Ok(response) => println!("{:#?}", response),
        Err(error) => println!("Error: {}", error),
    }
}

依赖项

~6–21MB
~272K SLoC