Added Core Features chroium, config,console_ui,headless,webserver,states
This commit is contained in:
parent
4c6c6d572c
commit
c3c60efb81
13 changed files with 688 additions and 0 deletions
20
Core/headless/mod.rs
Normal file
20
Core/headless/mod.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use crate::state::{SharedState, HeadlessPhase};
|
||||
|
||||
/// Startet die Headless Engine (Stub).
|
||||
/// Aktuell nur Statuswechsel; chromiumoxide folgt im nächsten Schritt.
|
||||
pub async fn start(state: SharedState) -> Result<(), Box<dyn std::error::Error>> {
|
||||
{
|
||||
let mut s = state.lock().unwrap();
|
||||
s.headless = HeadlessPhase::Starting;
|
||||
}
|
||||
|
||||
// Hier später: chromiumoxide Browser-Launch + Healthcheck
|
||||
// Für jetzt: kurze simulierte Init-Zeit
|
||||
tokio::time::sleep(std::time::Duration::from_millis(400)).await;
|
||||
|
||||
{
|
||||
let mut s = state.lock().unwrap();
|
||||
s.headless = HeadlessPhase::Ready;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue