ZeroTierOne/nonfree/controller/NotificationListener.hpp
Grant Limberg 195d5b47f0
Some checks are pending
/ build_macos (push) Waiting to run
/ build_windows (push) Waiting to run
/ build_ubuntu (push) Waiting to run
Merge branch 'adam/1.16' into gl/ctl-pubsub
2025-09-01 16:47:55 -07:00

32 lines
No EOL
696 B
C++

#ifndef NOTIFICATION_LISTENER_HPP
#define NOTIFICATION_LISTENER_HPP
#include <string>
namespace ZeroTier {
/**
* Base class for notification listeners
*
* This class is used to receive notifications from various sources such as Redis, PostgreSQL, etc.
*/
class NotificationListener {
public:
NotificationListener() = default;
virtual ~NotificationListener()
{
}
/**
* Called when a notification is received.
*
* Payload should be parsed and passed to the database handler's save method.
*
* @param payload The payload of the notification.
*/
virtual void onNotification(const std::string& payload) = 0;
};
} // namespace ZeroTier
#endif // NOTIFICATION_LISTENER_HPP