Clever-Cloud Software Development Kit - Rust edition
This crate provides structures and a client to interact with the Clever-Cloud API.
Status
This crate is stable and follows Semantic Versioning. The public
API tracks the Clever Cloud API; not every endpoint is implemented yet, and contributions
are welcome. See CHANGELOG.md for the release history.
Installation
To install this dependency, just add the following line to your Cargo.toml manifest.
= { = "^1.0.0", = ["metrics", "jsonschemas"] }
Usage
Below, you will find an example of executing a request to get information about myself.
use Error;
use ;
async
You could found more examples of how you could use the clevercloud-sdk by looking at the command line example.
Features
| name | description |
|---|---|
| tracing | Use tracing crate to expose traces |
| jsonschemas | Use schemars to add a derive instruction to generate json schemas representation of structures |
| logging | Use the log facility crate to print logs. Implies oauth10a/logging feature |
| metrics | Expose HTTP metrics through oauth10a crate feature. |
Metrics
Below, the exposed metrics gathered by prometheus:
| name | labels | kind | description |
|---|---|---|---|
| oauth10a_client_request | endpoint: String, method: String, status: Integer | Counter | number of request on api |
| oauth10a_client_request_duration | endpoint: String, method: String, status: Integer, unit: String | Counter | duration of request on api |
License
See the license.