elf_utils

Crates.ioelf_utils
lib.rself_utils
version0.1.4
sourcesrc
created_at2024-07-29 03:53:48.885514
updated_at2024-08-01 08:53:00.425867
descriptionelf_rust utils
homepage
repositoryhttps://github.com/aprchen/elf_utils
max_upload_size
id1318468
size93,674
chen su (aprchen)

documentation

README

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 and 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:

[dependencies]
elf_utils = "0.1.4"

Example

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
Commit count: 0

cargo fmt