Crates.io | openwhisk-rust |
lib.rs | openwhisk-rust |
version | 0.1.5 |
source | src |
created_at | 2022-06-02 05:15:00.890789 |
updated_at | 2023-01-05 10:27:43.203692 |
description | OpenWhisk Client written in Rust |
homepage | |
repository | https://github.com/hugobyte/openwhisk-client-rust |
max_upload_size | |
id | 598665 |
size | 79,786 |
This project Openwhisk-client-Rust is a Rust client library to access the Openwhisk API. This Project comes with Native and Wasm Support.
This Project requies latest verion of rust to be installed and configured.
The parameters of API_HOST, NAMESPACE and AUTH_TOKEN will be used to access the OpenWhisk services.
Configure your Openwhisk client by setting the whisk properties.
let wsk_properties = WskProperties::new(
"<Openwhisk_Auth_Token>",
"<Openwhisk_API_Host>",
<insecure(Bool: for secure or insecure connection )>,
"<Namespace>"
);
Invoke a deployed Action
let wsk_properties = WskProperties::new(
"<Openwhisk_Auth_Token>",
"<Openwhisk_API_Hosy>",
<Bool(true/false)>,
"<Namespace>"
);
let client = OpenwhiskClient::<NativeClient>::new(Some(&wsk_properties));
client.actions().invoke("your action name",serde_json::json!({"key":"value"}),true,true).unwrap();
Get list of available triggers
let wsk_properties = WskProperties::new(
"<Openwhisk_Auth_Token>",
"<Openwhisk_API_Hosy>",
<Bool(true/false)>,
"<Namespace>"
);
let client = OpenwhiskClient::<NativeClient>::new(Some(&wsk_properties));
let triggers = client.triggers().list().unwrap();
Get the properties of the rule
let wsk_properties = WskProperties::new(
"<Openwhisk_Auth_Token>",
"<Openwhisk_API_Hosy>",
<Bool(true/false)>,
"<Namespace>"
);
let client = OpenwhiskClient::<NativeClient>::new(Some(&wsk_properties));
let properties = client.rules().list().unwrap();
Contributions welcome particularly for enhancement of this library and also adding new functionality which helps in seamless interaction with Openwhisk Apis in rust applications.
Special thanks to Openwhisk-go-client for inspiring us to develop Openwhisk Client in rust
Licensed under Apache-2.0