userver: userver/ugrpc/impl/static_metadata.hpp Source File
Loading...
Searching...
No Matches
static_metadata.hpp
1#pragma once
2
3#include <string_view>
4
5#include <userver/utils/span.hpp>
6
7USERVER_NAMESPACE_BEGIN
8
9namespace ugrpc::impl {
10
11/// Per-gRPC-service statically generated data
12struct StaticServiceMetadata final {
13 std::string_view service_full_name;
14 utils::span<const std::string_view> method_full_names;
15};
16
17template <typename GrpcppService>
18constexpr StaticServiceMetadata MakeStaticServiceMetadata(
19 utils::span<const std::string_view> method_full_names) noexcept {
20 return {GrpcppService::service_full_name(), method_full_names};
21}
22
23} // namespace ugrpc::impl
24
25USERVER_NAMESPACE_END