octavia.amphorae.drivers.health package¶
Submodules¶
octavia.amphorae.drivers.health.heartbeat_udp module¶
-
class
UDPStatusGetter
[source]¶ Bases:
object
This class defines methods that will gather heatbeats
The heartbeats are transmitted via UDP and this class will bind to a port and absorb them
-
dorecv
(*args, **kw)[source]¶ Waits for a UDP heart beat to be sent.
- Returns
Returns the unwrapped payload and addr that sent the heartbeat. The format of the obj from the UDP sender can be seen below. Note that listener_1 has no pools and listener_4 has no members.
Example:
{ "listeners": { "listener_uuid_1": { "pools": {}, "status": "OPEN", "stats": { "conns": 0, "rx": 0, "tx": 0 } }, "listener_uuid_2": { "pools": { "pool_uuid_1": { "members": [{ "member_uuid_1": "DOWN" }, { "member_uuid_2": "DOWN" }, { "member_uuid_3": "DOWN" }, { "member_uuid_4": "DOWN" } ] } }, "status": "OPEN", "stats": { "conns": 0, "rx": 0, "tx": 0 } }, "listener_uuid_3": { "pools": { "pool_uuid_2": { "members": [{ "member_uuid_5": "DOWN" }, { "member_uuid_6": "DOWN" }, { "member_uuid_7": "DOWN" }, { "member_uuid_8": "DOWN" } ] } }, "status": "OPEN", "stats": { "conns": 0, "rx": 0, "tx": 0 } }, "listener_uuid_4": { "pools": { "pool_uuid_3": { "members": [] } }, "status": "OPEN", "stats": { "conns": 0, "rx": 0, "tx": 0 } } }, "id": "amphora_uuid", "seq": 1033 }
-