|
RTC Toolkit 6.0.0
|
Class that implements a very basic service discovery mechanism. More...
#include <rtctk/componentFramework/serviceDiscovery.hpp>
Public Types | |
| using | ServiceEndpoint = ServiceRegistryIf::ServiceEndpoint |
Public Member Functions | |
| ServiceDiscovery (std::unique_ptr< ServiceRegistryIf > &&adapter, const std::string &comp_name="") | |
| Create a new ServiceDiscovery object. | |
| ServiceDiscovery (const elt::mal::Uri ®istry, const std::string &comp_name="") | |
| Create a new ServiceDiscovery object. | |
| std::vector< std::string > | ListComponents (const std::string &service_type=ServiceRegistryIf::COMPONENT_TYPE) |
| Get known components. | |
| ServiceEndpoint | GetOldbEndpoint () |
| Get the Oldb Endpoint from the ServiceDiscovery. | |
| ServiceEndpoint | GetRuntimeRepoEndpoint () |
| Get the Runtime Repository Endpoint from the ServiceDiscovery. | |
| ServiceEndpoint | GetPersistentRepoEndpoint () |
| Get the Persistent Repository Endpoint from the ServiceDiscovery. | |
| ServiceEndpoint | GetTelegrafEndpoint () |
| Get the Telegraf Endpoint from the ServiceDiscovery. | |
| ServiceEndpoint | GetReqRepEndpoint (const std::string &name="", const std::string &service_type=ServiceRegistryIf::COMPONENT_TYPE, const bool health_check=true) |
| Get the Request/Reply Endpoint of a service like component. | |
| ServiceEndpoint | GetPubSubEndpoint (const std::string &component_name="", const std::string &service_type=ServiceRegistryIf::COMPONENT_TYPE, const bool health_check=true) |
| Get the PubSub Endpoint of a component. | |
Class that implements a very basic service discovery mechanism.
| using rtctk::componentFramework::ServiceDiscovery::ServiceEndpoint = ServiceRegistryIf::ServiceEndpoint |
|
explicit |
Create a new ServiceDiscovery object.
| [in] | adapter | A unique_ptr to the Service Registry to use for service discovery. |
| [in] | comp_name | Optional: the component name if used from within an RTC component. |
|
explicit |
Create a new ServiceDiscovery object.
| [in] | registry | URI to the Service Registry, currently only file:// and consul URIs are supported. |
| [in] | comp_name | Optional: the component name if used from within an RTC component. |
| ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetOldbEndpoint | ( | ) |
Get the Oldb Endpoint from the ServiceDiscovery.
| ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetPersistentRepoEndpoint | ( | ) |
Get the Persistent Repository Endpoint from the ServiceDiscovery.
| ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetPubSubEndpoint | ( | const std::string & | component_name = "", |
| const std::string & | service_type = ServiceRegistryIf::COMPONENT_TYPE, | ||
| const bool | health_check = true ) |
Get the PubSub Endpoint of a component.
| [in] | component_name | Optional: instance (component) name, otherwise component name during construction is used. |
| service_type | type of service e.g. rtctk_component | |
| [in] | health_check | Optional: if should be checked for the health of the component before returning a valid endpoint |
| ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetReqRepEndpoint | ( | const std::string & | name = "", |
| const std::string & | service_type = ServiceRegistryIf::COMPONENT_TYPE, | ||
| const bool | health_check = true ) |
Get the Request/Reply Endpoint of a service like component.
| [in] | name | Optional: instance (component) name, otherwise component name during construction is used. |
| service_type | type of service e.g. rtctk_component | |
| [in] | health_check | Optional: if should be checked for the health of the service (component) before returning a valid endpoint |
| ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetRuntimeRepoEndpoint | ( | ) |
Get the Runtime Repository Endpoint from the ServiceDiscovery.
| ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetTelegrafEndpoint | ( | ) |
Get the Telegraf Endpoint from the ServiceDiscovery.
| std::vector< std::string > rtctk::componentFramework::ServiceDiscovery::ListComponents | ( | const std::string & | service_type = ServiceRegistryIf::COMPONENT_TYPE | ) |
Get known components.
Use this method to retrieve all services of a certain type (components by default) known to the service discovery
| service_type | type of service e.g. rtctk_component, if empty all types will be considered |