rustploy 0.1.21

Rustploy PaaS daemon — lightweight self-hosted deployment platform
1
2
3
4
5
6
7
8
9
10
//! `Command::Ping`: responde `Pong` com o uptime.

use crate::bootstrap::state::AppState;
use shared::Response as RpResponse;

pub async fn handle(state: AppState) -> RpResponse {
    RpResponse::Pong {
        uptime_secs: state.started_at.elapsed().as_secs(),
    }
}