• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

getdozer / dozer / 5794103074

pending completion
5794103074

push

github

web-flow
feat: implement live code reload experience.  (#1826)

* feat: initialize live apis

* feat: update live experience

* chore: fix errors

* chore: include sql

* chore: add error when into not provided

* chore: comment opening web

* chore: introduce into validation

* chore: introduce stop sql

619 of 619 new or added lines in 9 files covered. (100.0%)

45561 of 59739 relevant lines covered (76.27%)

49556.57 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/dozer-cli/src/live/mod.rs
1
mod errors;
2
mod server;
3
mod state;
4
mod watcher;
5
use std::sync::Arc;
6
mod helper;
7
use dozer_types::{grpc_types::live::LiveResponse, log::info};
8
pub use errors::LiveError;
9
use futures::stream::{AbortHandle, Abortable};
10

11
use crate::shutdown::ShutdownReceiver;
12

13
use self::state::LiveState;
14

15
// const WEB_PORT: u16 = 4555;
16
pub fn start_live_server(
×
17
    runtime: Arc<tokio::runtime::Runtime>,
×
18
    shutdown: ShutdownReceiver,
×
19
) -> Result<(), LiveError> {
×
20
    let (sender, receiver) = tokio::sync::broadcast::channel::<LiveResponse>(100);
×
21
    let state = Arc::new(LiveState::new());
×
22

×
23
    state.build()?;
×
24

25
    let state2 = state.clone();
×
26

×
27
    // let browser_url = format!("http://localhost:{}", WEB_PORT);
×
28

×
29
    // if webbrowser::open(&browser_url).is_err() {
×
30
    //     info!("Failed to open browser. Connecto");
×
31
    // }
×
32
    info!("Starting live server");
×
33

34
    let rshudown = shutdown.clone();
×
35
    runtime.spawn(async {
×
36
        let (abort_handle, abort_registration) = AbortHandle::new_pair();
×
37
        tokio::spawn(async move {
×
38
            rshudown.create_shutdown_future().await;
×
39
            abort_handle.abort();
×
40
        });
×
41
        let res = match Abortable::new(server::serve(receiver, state2), abort_registration).await {
×
42
            Ok(result) => result.map_err(LiveError::Transport),
×
43
            Err(_) => Ok(()),
×
44
        };
45
        res.unwrap();
×
46
    });
×
47

×
48
    watcher::watch(sender, state.clone(), shutdown)?;
×
49

50
    Ok(())
×
51
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc