75 #include "../base/functional.h"
76 #include "../base/macros.h"
77 #include "../base/message_loop.h"
78 #include "../impl/types.h"
105 kFilterAvailable = 1,
193 [[nodiscard]]
static std::string
convert_type_to_view(uint32_t type,
const std::vector<Process>& process_list);
256 void process_timeout();
258 void process_offline(std::string_view hostname, uint32_t pid, std::string_view process_name);
265 std::unique_ptr<Impl> impl_;
MessageLoop-based aggregator of live VLink endpoint announcements.
Definition: discovery_viewer.h:92
static std::string get_listen_address()
Returns the UDP multicast/broadcast address used by the discovery subsystem.
std::string get_ser_type(const std::string &url) const
Resolves the announced serialisation type for url.
FilterType
Selects which announcements contribute to the live snapshot.
Definition: discovery_viewer.h:103
uint32_t get_max_elapsed_time() const override
Returns the maximum allowed task execution time in milliseconds.
size_t get_max_task_count() const override
Returns the maximum queue depth.
static ImplType convert_type(std::string_view str)
Translates a discovery role token to the corresponding ImplType bit.
std::vector< Info > get_info_list()
Returns a copy of the live snapshot at the moment of the call.
static std::string convert_type_to_view(uint32_t type, const std::vector< Process > &process_list)
Formats an ImplType bitmask together with its process list.
SchemaType get_schema_type(const std::string &url) const
Resolves the announced coarse schema family for url.
void on_end() override
Hook invoked once on the loop thread after the last task runs.
void on_begin() override
Hook invoked once on the loop thread before the first task runs.
static std::string convert_type_to_view(uint32_t type)
Formats an ImplType bitmask as a human-readable label.
~DiscoveryViewer() override
Stops the viewer loop and releases resources.
void register_callback(Callback &&callback)
Registers the callback notified on every snapshot change.
DiscoveryViewer(FilterType type=kFilterNone)
Builds the viewer with the requested filter mode.
Copyable type-erased callable analogue of std::function with a tunable SBO and pool spill.
Definition: functional.h:131
Serial task dispatcher with selectable queue backend and bounded timer registry.
Definition: message_loop.h:126
#define VLINK_EXPORT
Definition: macros.h:81
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
SchemaType
Coarse runtime schema family used by discovery, bag metadata and proxy routing.
Definition: types.h:207
@ kUnknown
Decoding family unknown.
ImplType
Bitmask identifying the role of a VLink node implementation.
Definition: types.h:110
One row of the discovery snapshot, describing a URL and its publishers/subscribers.
Definition: discovery_viewer.h:141
std::string ser_type
Serialisation type name announced for this URL.
Definition: discovery_viewer.h:145
std::string url
Fully-qualified VLink URL.
Definition: discovery_viewer.h:144
std::vector< Process > process_list
Processes currently hosting this URL.
Definition: discovery_viewer.h:147
bool operator<(const Info &target) const noexcept
Defines a stable ordering between two snapshot rows.
Identity of a process that hosts at least one endpoint for a URL.
Definition: discovery_viewer.h:113
std::string host
Host name of the process.
Definition: discovery_viewer.h:115
std::string ip
IP address of the host.
Definition: discovery_viewer.h:118
bool operator<(const Process &target) const noexcept
Defines a stable ordering between two process descriptors.
std::string name
Process or application name.
Definition: discovery_viewer.h:117