13#ifndef RTCTK_COMPONENTFRAMEWORK_SERVICEREGISTRYIF_HPP
14#define RTCTK_COMPONENTFRAMEWORK_SERVICEREGISTRYIF_HPP
58 explicit InvalidComponent(
const std::string& component,
const std::string& service);
60 const std::string& service,
61 const std::string& reason);
66 explicit InvalidService(
const std::string& service,
const std::string& reason);
70 explicit ConsulUnavailable(
const std::string& message,
const std::string& service);
112 const std::string& service_name,
113 const bool health_check =
true) = 0;
135 static std::unique_ptr<ServiceRegistryIf>
CreateAdapter(
const elt::mal::Uri& uri);
The RtctkException class is the base class for all Rtctk exceptions.
Definition: exceptions.hpp:237
Definition: serviceRegistryIf.hpp:68
Definition: serviceRegistryIf.hpp:56
Definition: serviceRegistryIf.hpp:63
Class that implements a service registry to be used by the service discovery.
Definition: serviceRegistryIf.hpp:31
virtual ServiceEndpoint GetOldbEndpoint()=0
Get the Oldb Endpoint from the service registry.
static const std::string REQ_REP_ENDPOINT
the string used to identify the Request/Reply endpoint of a service when using the Get function.
Definition: serviceRegistryIf.hpp:49
elt::mal::Uri AdapterIdType
The type used to distinguish between different adapters implementing ServiceRegistryIf.
Definition: serviceRegistryIf.hpp:41
virtual ServiceEndpoint GetRuntimeRepoEndpoint()=0
Get the Runtime Repository Endpoint from the service registry.
virtual std::vector< std::string > ListComponents()=0
Get known components.
static const std::string PUB_SUB_ENDPOINT
the string used to identify the PubSub endpoint of a service when using the Get function.
Definition: serviceRegistryIf.hpp:54
virtual ~ServiceRegistryIf()=default
virtual destructor
virtual ServiceEndpoint Get(const std::string &comp_name, const std::string &service_name, const bool health_check=true)=0
Get endpoint of specific service of a specific component.
virtual ServiceEndpoint GetPersistentRepoEndpoint()=0
Get the Persistent Repository Endpoint from the service registry.
elt::mal::Uri ServiceEndpoint
Definition: serviceRegistryIf.hpp:43
static std::unique_ptr< ServiceRegistryIf > CreateAdapter(const elt::mal::Uri &uri)
Factory method used to create the appropriate service registry adapter depending on the URI scheme.
Definition: serviceRegistryIf.cpp:63
Provides macros and utilities for exception handling.
Definition: commandReplier.cpp:22