Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From qsu-0.6.2 To qsu-0.7.0
2024-11-18
| ||
01:20 | Add crate version to clap. check-in: 0bf34bcb4f user: jan tags: trunk | |
2024-10-17
| ||
14:57 | Release maintenance. check-in: bdeb55f63b user: jan tags: qsu-0.7.0, trunk | |
14:52 | Add missing bound. check-in: 150898a4e2 user: jan tags: trunk | |
11:47 | Implicitly trace log when status reporter reports service state changes. check-in: 1bfa789ca3 user: jan tags: trunk | |
06:11 | Release maintenance. check-in: 0e755c10e7 user: jan tags: qsu-0.6.2, trunk | |
06:10 | Crate maintenance. check-in: 7ec935e407 user: jan tags: trunk | |
Changes to Cargo.toml.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + | [package] name = "qsu" |
︙ |
Changes to src/argp.rs.
︙ | |||
639 640 641 642 643 644 645 | 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 | - + + + + | /// name (determined by /// [`default_service_name()`](crate::default_service_name), then the /// aguments `--name <service name>` will be added. /// /// # Errors /// Application-defined error will be returned as `CbErr::Aop` to the /// original caller. |
︙ |
Changes to src/err.rs.
︙ | |||
243 244 245 246 247 248 249 250 251 252 253 254 255 256 | 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | + + + + + + + | #[cfg(windows)] impl From<windows_service::Error> for Error { fn from(err: windows_service::Error) -> Self { Self::SubSystem(err.to_string()) } } #[cfg(windows)] impl<ApEr> From<windows_service::Error> for CbErr<ApEr> { fn from(err: windows_service::Error) -> Self { Self::Lib(Error::SubSystem(err.to_string())) } } /* impl<ApEr> From<ApEr> for Error<ApEr> { /// Wrap an [`AppErr`] in an [`Error`]. fn from(err: ApEr) -> Self { Error::App(err) |
︙ |
Changes to src/rt.rs.
︙ | |||
185 186 187 188 189 190 191 192 193 194 195 196 197 198 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | + + + + + + + + | /// Report startup state to the system service manager. /// /// For foreground processes and services that do not support startup state /// notifications this method has no effect. pub fn report(&self, status: Option<StateMsg>) { let checkpoint = self.cnt.fetch_add(1, Ordering::SeqCst); if let Some(ref msg) = status { tracing::trace!( "Reached init checkpoint {checkpoint}; {}", msg.as_ref() ); } else { tracing::trace!("Reached init checkpoint {checkpoint}"); } self.sr.starting(checkpoint, status); } } /// Context passed to `term()` service application callback. /// |
︙ | |||
217 218 219 220 221 222 223 224 225 226 227 228 229 230 | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | + + + + + + + + | /// Report shutdown state to the system service manager. /// /// For foreground processes and services that do not support shutdown state /// notifications this method has no effect. pub fn report(&self, status: Option<StateMsg>) { let checkpoint = self.cnt.fetch_add(1, Ordering::SeqCst); if let Some(ref msg) = status { tracing::trace!( "Reached term checkpoint {checkpoint}; {}", msg.as_ref() ); } else { tracing::trace!("Reached term checkpoint {checkpoint}"); } self.sr.stopping(checkpoint, status); } } /// "Synchronous" (non-`async`) server application. /// |
︙ | |||
435 436 437 438 439 440 441 | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | - + | } impl RunCtx { /// Run as a systemd service. #[cfg(all(target_os = "linux", feature = "systemd"))] fn systemd<ApEr>(self, st: SrvAppRt<ApEr>) -> Result<(), CbErr<ApEr>> where |
︙ | |||
489 490 491 492 493 494 495 | 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | - + - + | } } /// Run as a Windows service. #[cfg(windows)] fn winsvc<ApEr>(self, st: SrvAppRt<ApEr>) -> Result<(), CbErr<ApEr>> where |
︙ | |||
631 632 633 634 635 636 637 | 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 | - + | /// /// # Errors /// [`CbErr::App`] is returned, containing application-specific error, if n /// application callback returned an error. [`CbErr::Lib`] indicates that an /// error occurred in the qsu runtime. pub fn run<ApEr>(self, st: SrvAppRt<ApEr>) -> Result<(), CbErr<ApEr>> where |
︙ | |||
665 666 667 668 669 670 671 | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 | - + - + - + | #[allow(clippy::missing_errors_doc)] pub fn run_sync<ApEr>( self, svcevt_handler: Box<dyn FnMut(SvcEvt) + Send>, rt_handler: Box<dyn ServiceHandler<AppErr = ApEr> + Send> ) -> Result<(), CbErr<ApEr>> where |
︙ |
Changes to src/rt/rttype.rs.
︙ | |||
8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | + + + | #[cfg(feature = "tokio")] #[cfg_attr(docsrs, doc(cfg(feature = "tokio")))] mod tokio; #[cfg(feature = "rocket")] #[cfg_attr(docsrs, doc(cfg(feature = "rocket")))] mod rocket; const SVCAPP_INIT_MSG: &str = "Begin service application initialization"; const SVCAPP_TERM_MSG: &str = "Begin service application termination"; pub use sync::{main as sync_main, MainParams as SyncMainParams}; #[cfg(feature = "tokio")] #[cfg_attr(docsrs, doc(cfg(feature = "tokio")))] pub use tokio::{main as tokio_main, MainParams as TokioMainParams}; |
︙ |
Changes to src/rt/rttype/rocket.rs.
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - - + + | let (tx_svcevt, rx_svcevt) = if let Some((tx_svcevt, rx_svcevt)) = svcevt_ch { (tx_svcevt, rx_svcevt) } else { init_svc_channels(&ks) }; |
︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - + - + + | } else { None }; // Always send the first shutdown checkpoint here. Either init() failed or // run retuned. Either way, we're shutting down. |
︙ |
Changes to src/rt/rttype/sync.rs.
︙ | |||
92 93 94 95 96 97 98 99 100 101 102 103 104 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | + - + + | // register a Ctrl+C handler. #[cfg(windows)] signals::sync_kill_to_event(tx2, test_mode)?; (tx, rx) }; //sr.starting(1, Some(super::SVCAPP_INIT_MSG.into())); // Call server application's init() method, passing along a startup state // reporter object. let ictx = InitCtx { re: re.clone(), sr: Arc::clone(&sr), |
︙ | |||
135 136 137 138 139 140 141 | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - - + + - + + | ret } else { None }; // Always send the first shutdown checkpoint here. Either init() failed or |
︙ |
Changes to src/rt/rttype/tokio.rs.
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + | /// Internal `main()`-like routine for server applications that run the tokio /// runtime for `async` code. pub fn main<ApEr>( rtbldr: Option<runtime::Builder>, params: MainParams<ApEr> ) -> Result<(), CbErr<ApEr>> where |
︙ | |||
59 60 61 62 63 64 65 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + - + + + + + + + + + + + - + - + + + + + + | svcevt_handler, mut rt_handler, sr, svcevt_ch }: MainParams<ApEr> ) -> Result<(), CbErr<ApEr>> where |
︙ |
Changes to src/rt/winsvc.rs.
︙ | |||
111 112 113 114 115 116 117 | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - - - + - + | } } fn started(&self) { if let Err(e) = self.tx.send(ToSvcMsg::Started) { log::error!("Unable to send Started message; {}", e); } |
︙ | |||
180 181 182 183 184 185 186 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | + + + - - + + + + + - - + + + + - + | // Register generated `ffi_service_main` with the system and start the // service, blocking this thread until the service is stopped. service_dispatcher::start(svcname, ffi_service_main)?; // The return value should be hard-coded to `Result<(), Error>`, so this // unwrap should be okay. match jh.join() { Ok(res) => { tracing::trace!("srvapp_thread::join res={res:?}"); match res { |
︙ | |||
245 246 247 248 249 250 251 | 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | - | re, svcevt_handler, rt_handler, sr, svcevt_ch: Some((tx_svcevt, rx_svcevt)) } ), |
︙ |
Changes to www/changelog.md.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + + + + + + + + + + + + + | # Change log ⚠️ indicates a breaking change. ## [Unreleased] |
︙ |