Crate ej_builder_sdk

Source
Expand description

Builder SDK for the EJ framework.

Provides communication interface between builders and the EJ dispatcher.

§Usage

use ej_builder_sdk::{BuilderSdk, BuilderEvent};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let sdk = BuilderSdk::init(|event| {
        match event {
            BuilderEvent::Exit => {
                // Cleanup logic here
                println!("Received exit signal");
                std::process::exit(0);
            }
        }
    }).await.unwrap();
     
    // Builder logic here
    Ok(())
}

Modules§

error
Error types for the builder SDK.
prelude
Crate Prelude

Structs§

BuilderSdk
Builder SDK for communicating with the EJ dispatcher.

Enums§

Action
BuilderEvent
Events sent from the dispatcher to the builder.
BuilderResponse
Responses sent from the builder to the dispatcher.