userver: userver/ugrpc/impl/static_metadata.hpp Source File
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
static_metadata.hpp
1#pragma once
2
3#include <string_view>
4
5#include <userver/utils/impl/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::impl::Span<const std::string_view> method_full_names;
15};
16
17template <typename GrpcppService>
18constexpr StaticServiceMetadata MakeStaticServiceMetadata(
19 utils::impl::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