msaUtils Module¶
.healthcheck
¶
Classes¶
MSAHealthCheck ¶
Bases: Thread
Attributes¶
Functions¶
__init__ ¶
MSAHealthCheckObject, provides a thread to give a healthcheck.
PARAMETER | DESCRIPTION |
---|---|
healthdefinition |
The MSAHealthDefinition instance
TYPE:
|
host |
IP/URl to call the healtcheck endpoint
TYPE:
|
port |
Port of the healtcheck endpoint server listener/endpoint
TYPE:
|
get_health
async
¶
Get the last health check result
The string is "positiv: status_code" or "negative: status_code"
run ¶
Run the Healthcheck Thread
Sleeps by the interval provided by the MSAHealthDefinition.
Uses httpx to call the healthcheck endpoint which is http://{}:{}/".format(host, port)
Any 200 <= response.status_code < 300 is healthy, rest is not healthy
Created: September 24, 2022