Class ServiceDiscovery

Class Documentation

class ServiceDiscovery

Public Functions

ServiceDiscovery() noexcept
ServiceDiscovery(const ServiceDiscovery&) = delete
ServiceDiscovery &operator=(const ServiceDiscovery&) = delete
ServiceDiscovery(ServiceDiscovery&&) = delete
ServiceDiscovery &operator=(ServiceDiscovery&&) = delete
~ServiceDiscovery() noexcept = default
void findService(const cxx::optional<capro::IdString_t> &service, const cxx::optional<capro::IdString_t> &instance, const cxx::optional<capro::IdString_t> &event, const cxx::function_ref<void(const capro::ServiceDescription&)> &callableForEach, const popo::MessagingPattern pattern) noexcept

Searches all services with the given messaging pattern that match the provided service description and applies a function to each of them.

Parameters:
  • service[in] service string to search for, a nullopt corresponds to a wildcard

  • instance[in] instance string to search for, a nullopt corresponds to a wildcard

  • event[in] event string to search for, a nullopt corresponds to a wildcard

  • callableForEach[in] callable to apply to all matching services

  • pattern[in] messaging pattern of the service to search