Manager class for handling data taps.
More...
#include <taps.hpp>
|
| | TapManager (zmq::context_t &zmq_context, const std::string ®istry_endpoint=kDefaultTapZMQIPC) |
| | Constructor for TapManager.
|
|
| ~TapManager () |
| | Destructor - ensures all resources are cleaned up.
|
| std::optional< synapse::TapConnection > | add_tap (const std::string &name, const std::string &message_type_name) |
| | Adds a new tap with the specified name and message type.
|
| std::optional< synapse::TapConnection > | add_consumer_tap (const std::string &name, const std::string &message_type_name, const std::function< void(zmq::message_t message)> &callback) |
| | Adds a new consumer tap with the specified name and message type.
|
| template<typename T> |
| bool | send_message (const std::string &name, const T &message) |
| | Sends a message through a named tap.
|
|
void | stop () |
| | Stops the tap manager and releases resources.
|
Manager class for handling data taps.
Provides functionality to create taps and send messages through them.
◆ TapManager()
| synapse::TapManager::TapManager |
( |
zmq::context_t & | zmq_context, |
|
|
const std::string & | registry_endpoint = kDefaultTapZMQIPC ) |
|
explicit |
Constructor for TapManager.
- Parameters
-
| zmq_context | ZMQ context to use for socket creation |
| registry_endpoint | Endpoint for the tap registry |
◆ add_consumer_tap()
| std::optional< synapse::TapConnection > synapse::TapManager::add_consumer_tap |
( |
const std::string & | name, |
|
|
const std::string & | message_type_name, |
|
|
const std::function< void(zmq::message_t message)> & | callback ) |
|
inline |
Adds a new consumer tap with the specified name and message type.
- Parameters
-
| name | Name of the tap |
| message_type_name | Name of the message type for the tap |
- Returns
- true if tap was added successfully, false otherwise
◆ add_tap()
| std::optional< synapse::TapConnection > synapse::TapManager::add_tap |
( |
const std::string & | name, |
|
|
const std::string & | message_type_name ) |
Adds a new tap with the specified name and message type.
- Parameters
-
| name | Name of the tap |
| message_type_name | Name of the message type for the tap |
- Returns
- Optional TapConnection, contains connection info if successful, empty if failed
◆ send_message()
template<typename T>
| bool synapse::TapManager::send_message |
( |
const std::string & | name, |
|
|
const T & | message ) |
|
inline |
Sends a message through a named tap.
- Template Parameters
-
| T | Protocol Buffers message type to send |
- Parameters
-
| name | Name of the tap to send through |
| message | Message to send |
- Returns
- true if message was sent successfully, false otherwise
The documentation for this class was generated from the following files:
- include/synapse-app-sdk/middleware/taps.hpp
- src/middleware/taps.cpp