6#include <userver/components/component_base.hpp>
7#include <userver/middlewares/runner.hpp>
9#include <userver/ugrpc/client/client_factory.hpp>
10#include <userver/ugrpc/client/middlewares/base.hpp>
12USERVER_NAMESPACE_BEGIN
14namespace ugrpc::client {
19using MiddlewareRunnerComponentBase = USERVER_NAMESPACE::middlewares::RunnerComponentBase<MiddlewareBase, ClientInfo>;
68class ClientFactoryComponent
final :
public impl::MiddlewareRunnerComponentBase {
72 static constexpr std::string_view
kName =
"grpc-client-factory";
74 ClientFactoryComponent(
const components::ComponentConfig& config,
const components::ComponentContext& context);
76 ClientFactory& GetFactory();
78 static yaml_config::Schema GetStaticConfigSchema();
81 std::optional<ClientFactory> factory_;
87inline constexpr bool components::kHasValidate<ugrpc::client::ClientFactoryComponent> =
true;