# elf_utils
A tool library based on elf_rust. The default method encapsulates some of my own logic. It can be used as a reference for the use of [elf_rust](https://github.com/aprchen/elf_rust) and [cloud_task_executor](https://github.com/aprchen/cloud_task_executor), but don't use it directly unless you and I are in the same company.
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
elf_utils = "0.1.2"
```
## Example
```rust
use log::info;
use serde_json::Value;
use elf_utils::*;
async fn my_task(_ctx: Context, payload: Value) -> Result<String, String> {
info!("Task running with sample value: {:?}",payload);
Ok("Task result".to_string())
}
#[tokio::main]
async fn main() {
default_handle_script("my_task", my_task).await;
}
```
## Environment Variables
- RUST_LOG=debug # log level, default is info
- FeiShu_WEBHOOK # feishu webhook url
- FeiShu_SECRET # feishu secret
- TASK_MASTER # feishu uid
- REPORT_HOST # report host