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(|sdk, event| async move {
match event {
BuilderEvent::Exit => {
// Cleanup logic here
println!("Received exit signal for: ");
println!("{} {} ({:?})", sdk.board_name(), sdk.board_config_name(), sdk.action());
std::process::exit(0);
}
}
}).await.unwrap();
// Builder logic here
Ok(())
}Modules§
Structs§
- Builder
Sdk - Builder SDK for communicating with the EJ dispatcher.
Enums§
- Action
- Builder
Event - Events sent from the dispatcher to the builder.
- Builder
Response - Responses sent from the builder to the dispatcher.