15#ifndef OPFLEX_CORE_PEERSTATUSLISTENER_H
16#define OPFLEX_CORE_PEERSTATUSLISTENER_H
An interface for a listener that will get status update events for peer connection state.
Definition PeerStatusListener.h:30
PeerStatus
The status of a particular peer, which will be sent in the peer status update callback.
Definition PeerStatusListener.h:41
@ DISCONNECTED
The peer is disconnected and not trying to connect.
Definition PeerStatusListener.h:45
@ CLOSING
The peer connection is closing.
Definition PeerStatusListener.h:61
@ READY
The peer is connected and ready.
Definition PeerStatusListener.h:57
@ CONNECTING
The peer is connecting.
Definition PeerStatusListener.h:49
@ CONNECTED
The peer is connected but not yet ready.
Definition PeerStatusListener.h:53
virtual ~PeerStatusListener()
Destroy the peer status listener.
Definition PeerStatusListener.h:35
virtual void peerStatusUpdated(const std::string &peerHostname, int peerPort, PeerStatus peerStatus)
Called when the connection state changes for a given Opflex peer.
Definition PeerStatusListener.h:72
Health
Represents the overall health of the opflex connection pool.
Definition PeerStatusListener.h:79
@ DEGRADED
At least one opflex peer is in a state other than READY.
Definition PeerStatusListener.h:87
@ HEALTHY
All opflex peers are connected and ready.
Definition PeerStatusListener.h:91
@ DOWN
There is no ready Opflex peer connection.
Definition PeerStatusListener.h:83
virtual void healthUpdated(Health health)
Called when the overall health of the opflex connection pool changes.
Definition PeerStatusListener.h:100