rename rhai client to dispatcher

This commit is contained in:
Timur Gordon
2025-07-09 23:39:48 +02:00
parent d059af9a18
commit 29ff40d1a4
19 changed files with 205 additions and 136 deletions

View File

@@ -1,5 +1,5 @@
use clap::Parser;
use rhai_client::{RhaiClient, RhaiClientBuilder};
use rhai_dispatcher::{RhaiDispatcher, RhaiDispatcherBuilder};
use log::{error, info};
use std::io::{self, Write};
use std::time::Duration;
@@ -46,8 +46,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Configure logging based on verbosity level
let log_config = match args.verbose {
0 => "warn,circles_client=info,rhai_client=info",
1 => "info,circles_client=debug,rhai_client=debug",
0 => "warn,circles_client=info,rhai_dispatcher=info",
1 => "info,circles_client=debug,rhai_dispatcher=debug",
2 => "debug",
_ => "trace",
};
@@ -68,7 +68,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
info!();
// Create the Rhai client
let client = RhaiClientBuilder::new()
let client = RhaiDispatcherBuilder::new()
.caller_id(&args.caller_public_key)
.redis_url(&args.redis_url)
.build()?;
@@ -97,7 +97,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
async fn execute_script(
client: &RhaiClient,
client: &RhaiDispatcher,
worker_key: &str,
script: String,
timeout_secs: u64,
@@ -134,7 +134,7 @@ async fn execute_script(
}
async fn run_interactive_mode(
client: &RhaiClient,
client: &RhaiDispatcher,
worker_key: &str,
timeout_secs: u64,
) -> Result<(), Box<dyn std::error::Error>> {