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>;
58class ClientFactoryComponent
final :
public impl::MiddlewareRunnerComponentBase {
62 static constexpr std::string_view
kName =
"grpc-client-factory";
64 ClientFactoryComponent(
const components::ComponentConfig& config,
const components::ComponentContext& context);
66 ClientFactory& GetFactory();
68 static yaml_config::Schema GetStaticConfigSchema();
71 std::optional<ClientFactory> factory_;
77inline constexpr bool components::kHasValidate<ugrpc::client::ClientFactoryComponent> =
true;