UniSet @VERSION@
Открытые члены | Открытые статические члены | Полный список членов класса
Класс uniset::HealthChecker

#include <HealthChecker.h>

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

 HealthChecker (std::shared_ptr< Configuration > conf=nullptr)
 
bool waitForReady (const ReadyCheck &check, size_t timeout_msec)
 
bool waitForReady (const ReadyCheck &check, size_t timeout_msec, const std::atomic< bool > &cancelFlag)
 
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() [1/2]

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

◆ waitForReady() [2/2]

bool uniset::HealthChecker::waitForReady ( const ReadyCheck check,
size_t  timeout_msec,
const std::atomic< bool > &  cancelFlag 
)

Check if process is ready, with cancellation support.

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