refactor: drive the watch loop with async streams in the Elm style
Every source is a stream of ScreenInput values: the systemd bus (resolved into BootChange values), keys, frame ticks, full repaints, password requests and SIGTERM. They are merged with stream::select and folded by one owned WatchScreen, drawing once per ready batch. The live boot and the scripted demo share the fold and differ only in their console desk. tokio current-thread replaces poll(2) and signal-hook. Release binary: 1.74 MB -> 1.86 MB.
This commit is contained in:
1 parent
ba6e934412
commit
d0063c2371
14 files changed
+948
-412
No files matched your search
@@ -1,3 +1,4 @@
|
||||
mod boot_change;
|
||||
pub mod boot_origin;
|
||||
mod job_ingestion;
|
||||
mod reached_milestones;
|
||||
@@ -7,6 +8,7 @@ mod waiting_tree;
|
||||
use std::{collections::HashMap, time::Duration};
|
||||
|
||||
pub use self::{
|
||||
boot_change::BootChange,
|
||||
reached_milestones::MilestoneRow,
|
||||
unit_facts::{ActiveState, Activity, JobKind, JobResult, UnitFacts, UnitKind},
|
||||
waiting_tree::{RowStatus, TreeNode, TreeRow, flatten_forest},
|
||||
|
||||
Reference in new issue
Block a user