Apollo C++ Client
C++ client for Apollo Configuration Center
|
Apollo Configuration Center Client Library. More...
#include "apollo_types.h"
Go to the source code of this file.
Classes | |
class | apollo::client::ApolloClient |
Interface for the Apollo configuration center client. More... |
Typedefs | |
using | apollo::client::ClientPtr = std::shared_ptr<ApolloClient> |
using | apollo::client::NotificationCallback |
using | apollo::client::NotificationCallbackPtr = std::weak_ptr<NotificationCallback> |
Functions | |
ClientPtr | apollo::client::makeApolloClient (const std::string &apollo_url, const std::string &app_id, Opts &&opts=Opts(), LoggerPtr logger=nullptr) |
Creates a new Apollo client instance. |
Apollo Configuration Center Client Library.
using apollo::client::NotificationCallback |
ClientPtr apollo::client::makeApolloClient | ( | const std::string & | apollo_url, |
const std::string & | app_id, | ||
Opts && | opts = Opts(), | ||
LoggerPtr | logger = nullptr ) |
Creates a new Apollo client instance.
The method will connect to the Apollo server and load configurations for initialization when created.
apollo_url | Apollo server URL (e.g., "http://apollo-service:8080" or "http://apollo-server.com") |
app_id | Application ID registered in Apollo Configuration Center |
opts | Client options including cluster name, namespaces, and label |
logger | Optional logger for diagnostic messages (nullptr for no logging) |
std::runtime_error | If initialization fails (e.g., invalid URL or app_id) |