cloud_task_executor 0.1.4

The Cloud Task Executor is a versatile and powerful framework designed to simplify the execution of tasks in cloud environments such as AWS Lambda and Alibaba Cloud Function Compute (FC). It provides a unified interface for registering and executing tasks, managing execution contexts, and handling pre- and post-execution actions. This flexibility allows developers to focus on the core logic of their tasks without worrying about the underlying cloud infrastructure.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use structopt::StructOpt;
use serde_json::Value;

#[derive(StructOpt, Debug)]
#[structopt(name = "cloud_task_executor")]
pub struct Args {
    /// The payload for the task
    #[structopt(short, long, parse(try_from_str = parse_json))]
    pub payload: Option<Value>,
}

fn parse_json(src: &str) -> Result<Value, serde_json::Error> {
    serde_json::from_str(src)
}