Information service for QC.
More...
#include <ServiceDiscovery.h>
|
| ServiceDiscovery (const std::string &url, const std::string &name, const std::string &id, const std::string &healthEndpoint=GetDefaultUrl()) |
|
| ~ServiceDiscovery () |
| Stops the health thread and deregisteres from Consul health checks.
|
|
void | _register (const std::string &objects) |
|
void | deregister () |
| Deregisters service.
|
|
|
static std::string | GetDefaultUrl () |
|
static std::string | GetDefaultUrl (size_t port) |
|
Information service for QC.
Register a endpoint to Consul which then performs health checks it Allow to publish list of online objects
o2::quality_control::core::ServiceDiscovery::ServiceDiscovery |
( |
const std::string & |
url, |
|
|
const std::string & |
name, |
|
|
const std::string & |
id, |
|
|
const std::string & |
healthEndpoint = GetDefaultUrl() |
|
) |
| |
Sets up CURL and health check
- Parameters
-
url | Consul URL |
name | Service name |
id | Unique instance ID |
healthEndpoint | Local endpoint that is then used for health checks (default value it set to <hostname>:7777) |
void o2::quality_control::core::ServiceDiscovery::_register |
( |
const std::string & |
objects | ) |
|
Registers list of online objects by sending HTTP PUT request to Consul server
- Parameters
-
objects | List of comma separated objects |
static std::string o2::quality_control::core::ServiceDiscovery::GetDefaultUrl |
( |
size_t |
port | ) |
|
|
inlinestatic |
- Parameters
-
port | Provides default health check URL |
The documentation for this class was generated from the following files: