mirror of
https://codeberg.org/icewind/haze.git
synced 2026-10-01 08:44:09 +02:00
show information about slow starting services on start
This commit is contained in:
parent
b8c391b014
commit
5555efbfcc
5 changed files with 154 additions and 56 deletions
|
|
@ -1,9 +1,9 @@
|
|||
use bollard::Docker;
|
||||
use bollard::exec::{CreateExecOptions, ResizeExecOptions, StartExecResults};
|
||||
use bollard::query_parameters::LogsOptions;
|
||||
use bollard::Docker;
|
||||
use futures_util::StreamExt;
|
||||
use miette::{IntoDiagnostic, Report, Result, WrapErr};
|
||||
use std::io::{stdout, Read, Stdin, Write};
|
||||
use std::io::{Read, Stdin, Write, stdout};
|
||||
use std::time::Duration;
|
||||
use termion::raw::IntoRawMode;
|
||||
use termion::{async_stdin, is_tty, terminal_size};
|
||||
|
|
@ -206,6 +206,7 @@ pub async fn container_logs(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct ExitCode(i64);
|
||||
|
||||
impl ExitCode {
|
||||
|
|
@ -213,7 +214,7 @@ impl ExitCode {
|
|||
self.0 == 0
|
||||
}
|
||||
|
||||
pub fn to_result(&self) -> Result<()> {
|
||||
pub fn to_result(self) -> Result<()> {
|
||||
match self.0 {
|
||||
0 => Ok(()),
|
||||
code => Err(Report::msg(format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue