UniSet 2.44.3
Класс uniset::HealthChecker

#include <HealthChecker.h>

Открытые члены

 HealthChecker (std::shared_ptr< Configuration > conf=nullptr)
bool waitForReady (const ReadyCheck &check, size_t timeout_msec)
bool checkOnce (const ReadyCheck &check)

Открытые статические члены

static bool isProcessAlive (Poco::Process::PID pid)
static ReadyCheck parseReadyCheck (const std::string &checkStr)

Подробное описание

Health checker for process readiness and liveness. Supports multiple check types: TCP, CORBA, HTTP, File.

Методы

◆ checkOnce()

bool uniset::HealthChecker::checkOnce ( const ReadyCheck & check)

Single check (non-blocking).

Возвращает
true if check passes

◆ isProcessAlive()

bool uniset::HealthChecker::isProcessAlive ( Poco::Process::PID pid)
static

Check if process is alive by PID.

Аргументы
pidProcess ID
Возвращает
true if process exists

◆ parseReadyCheck()

ReadyCheck uniset::HealthChecker::parseReadyCheck ( const std::string & checkStr)
static

Parse ready check string like "tcp:2809" or "corba:SharedMemory"

◆ waitForReady()

bool uniset::HealthChecker::waitForReady ( const ReadyCheck & check,
size_t timeout_msec )

Check if process is ready based on ReadyCheck configuration. Blocks until ready or timeout.

Аргументы
checkReadyCheck configuration
timeout_msecMaximum wait time in milliseconds
Возвращает
true if ready, false if timeout