Skip to content

webserver_liveness_addon

messageflux.service_addons.webserver_liveness_addon

WebServerLivenessAddon

WebServerLivenessAddon(host='0.0.0.0', port=8080)

an addon that adds a small webserver that listens on all routes and returns 200 if the service is alive or 500 otherwise. useful for liveness checks in deployments

Parameters:

Name Type Description Default
host str

the host to listen on

'0.0.0.0'
port int

the port to listen on

8080

service property

service

the attached service (or None if no service is attached)

attach

attach(service)

attached the addon to a service, and returns the addon

Parameters:

Name Type Description Default
service BaseService

the service to attach to

required

detach

detach()

detaches from a service

WebServerLivenessAddonException

Bases: Exception

the exception type for this addon