#include <userver/dynamic_config/client/component.hpp>
Component that starts a clients::dynamic_config::Client client.
Returned references to clients::dynamic_config::Client live for a lifetime of the component and are safe for concurrent use.
The component must be configured in service config.
Name | Description | Default value |
---|---|---|
get-configs-overrides-for-service | send service-name field | true |
service-name | name of the service to send if the get-configs-overrides-for-service is true | - |
http-timeout | HTTP request timeout to the remote in utils::StringToDuration() suitable format | - |
http-retries | HTTP retries before reporting the request failure | - |
config-url | HTTP URL to request configs via POST request | - |
append-path-to-url | add default path '/configs/values' to 'config-url' | true |
configs-stage: stage name provided statically, can be overridden from file | - configs-stage-filepath: file to read stage name from, overrides static "configs-stage" if both are provided, expected format: json file with "env_name" property | - fallback-to-no-proxy | make additional attempts to retrieve configs by bypassing proxy that is set in USERVER_HTTP_PROXY runtime variable | true
Definition at line 42 of file component.hpp.
Public Member Functions | |
DynamicConfigClient (const ComponentConfig &, const ComponentContext &) | |
dynamic_config::Client & | GetClient () const |
Public Member Functions inherited from components::LoggableComponentBase | |
LoggableComponentBase (const ComponentConfig &, const ComponentContext &) | |
LoggableComponentBase (LoggableComponentBase &&)=delete | |
LoggableComponentBase (const LoggableComponentBase &)=delete | |
~LoggableComponentBase () override=default | |
ComponentHealth | GetComponentHealth () const override |
void | OnLoadingCancelled () override |
void | OnAllComponentsLoaded () override |
void | OnAllComponentsAreStopping () override |
Static Public Member Functions | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Member Functions inherited from components::LoggableComponentBase | |
static yaml_config::Schema | GetStaticConfigSchema () |
Static Public Attributes | |
static constexpr std::string_view | kName = "dynamic-config-client" |
The default name of components::DynamicConfigClient. | |