4 releases (breaking)
0.4.0 | Aug 3, 2021 |
---|---|
0.3.0 | Feb 5, 2021 |
0.2.0 | Jan 21, 2021 |
0.1.0 | Sep 20, 2020 |
#7 in #csi
55 downloads per month
Used in kubelet
18KB
k8s-csi
Automatically generated Rust types, clients, and servers from Kubernetes CSI Protobuf spec using tonic
.
lib.rs
:
k8s-csi
Automatically generated types, clients, and servers from Kubernetes CSI Protobuf definitions.
Examples
Connecting over TCP:
use k8s_csi::v1_3_0::controller_client::ControllerClient;
use k8s_csi::v1_3_0::ListVolumesRequest;
#[tokio::main]
async fn main() {
let mut client = ControllerClient::connect("lttp://[::]:50051").await.expect("Could not create client.");
let request = tonic::Request::new(ListVolumesRequest {
max_entries: 0,
starting_token: "".to_string()
});
let response = client.list_volumes(request).await.expect("Request failed.");
println!("{:?}", response);
}
Dependencies
~14–23MB
~426K SLoC