GRPC C++
1.64.0
include
grpc
support
metrics.h
Go to the documentation of this file.
1
// Copyright 2024 The gRPC Authors.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef GRPC_SUPPORT_METRICS_H
16
#define GRPC_SUPPORT_METRICS_H
17
18
#include "absl/strings/string_view.h"
19
20
#include <
grpc/support/port_platform.h
>
21
22
namespace
grpc_core
{
23
namespace
experimental {
24
25
// Configuration (scope) for a specific client channel to be used for stats
26
// plugins.
27
class
StatsPluginChannelScope
{
28
public
:
29
StatsPluginChannelScope
(absl::string_view
target
,
30
absl::string_view
default_authority
)
31
: target_(
target
), default_authority_(
default_authority
) {}
32
36
absl::string_view
target
()
const
{
return
target_; }
38
absl::string_view
default_authority
()
const
{
return
default_authority_; }
39
40
private
:
41
// Disable copy constructor and copy-assignment operator.
42
StatsPluginChannelScope
(
const
StatsPluginChannelScope
&) =
delete
;
43
StatsPluginChannelScope
& operator=(
const
StatsPluginChannelScope
&) =
delete
;
44
absl::string_view target_;
45
absl::string_view default_authority_;
46
};
47
48
}
// namespace experimental
49
}
// namespace grpc_core
50
51
#endif
/* GRPC_SUPPORT_METRICS_H */
grpc_core
Definition:
grpc_audit_logging.h:31
grpc_core::experimental::StatsPluginChannelScope::StatsPluginChannelScope
StatsPluginChannelScope(absl::string_view target, absl::string_view default_authority)
Definition:
metrics.h:29
grpc_core::experimental::StatsPluginChannelScope::target
absl::string_view target() const
Returns the target used for creating the channel in the canonical form.
Definition:
metrics.h:36
grpc_core::experimental::StatsPluginChannelScope
Definition:
metrics.h:27
grpc_core::experimental::StatsPluginChannelScope::default_authority
absl::string_view default_authority() const
Returns the default authority for the channel.
Definition:
metrics.h:38
port_platform.h
Generated on Fri May 17 2024 01:17:15 for GRPC C++ by
1.8.17