RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
fileServiceRegistryAdapter.hpp
Go to the documentation of this file.
1
11
12#ifndef RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERYFILEADAPTER_HPP
13#define RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERYFILEADAPTER_HPP
14
15#include <memory>
16#include <string>
17
18#include <config-ng/ciiConfigApi.hpp>
19#include <mal/Cii.hpp>
20
22
24
34public:
35 inline static const std::string SUPPORTED_URI_SCHEME = "file";
36
37 explicit FileServiceRegistryAdapter(const elt::mal::Uri& endpoint);
38 std::vector<std::string>
39 ListComponents(const std::string& service_type = COMPONENT_TYPE) override;
40 ServiceEndpoint Get(const std::string& comp_name,
41 const std::string& service_name,
42 const std::string& service_type,
43 const bool health_check) override;
48
49private:
50 static const std::string RUNTIME_REPO_ENDPOINT;
51 static const std::string PERSISTENT_REPO_ENDPOINT;
52 static const std::string OLDB_ENDPOINT;
53 static const std::string TELEGRAF_ENDPOINT;
54 elt::mal::Uri sde;
55 elt::configng::CiiConfigDocument m_document;
56};
57
58} // namespace rtctk::componentFramework
59
60#endif // RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERYFILEADAPTER_HPP
std::vector< std::string > ListComponents(const std::string &service_type=COMPONENT_TYPE) override
Get known components.
Definition fileServiceRegistryAdapter.cpp:79
ServiceEndpoint GetOldbEndpoint() override
Get the Oldb Endpoint from the service registry.
Definition fileServiceRegistryAdapter.cpp:91
static const std::string SUPPORTED_URI_SCHEME
Definition fileServiceRegistryAdapter.hpp:35
FileServiceRegistryAdapter(const elt::mal::Uri &endpoint)
Definition fileServiceRegistryAdapter.cpp:35
ServiceEndpoint GetPersistentRepoEndpoint() override
Get the Persistent Repository Endpoint from the service registry.
Definition fileServiceRegistryAdapter.cpp:100
ServiceEndpoint GetRuntimeRepoEndpoint() override
Get the Runtime Repository Endpoint from the service registry.
Definition fileServiceRegistryAdapter.cpp:95
ServiceEndpoint Get(const std::string &comp_name, const std::string &service_name, const std::string &service_type, const bool health_check) override
Get endpoint of specific service of a specific component.
Definition fileServiceRegistryAdapter.cpp:46
ServiceEndpoint GetTelegrafEndpoint() override
Get the Telegraf Endpoint from the service registry.
Definition fileServiceRegistryAdapter.cpp:104
Class that implements a service registry to be used by the service discovery.
Definition serviceRegistryIf.hpp:30
static const std::string COMPONENT_TYPE
the string for component type (default)
Definition serviceRegistryIf.hpp:59
elt::mal::Uri ServiceEndpoint
Definition serviceRegistryIf.hpp:42
Definition commandReplier.cpp:21
Class that implements the service registry interface.