server_config_selector.cc
Go to the documentation of this file.
1 //
2 // Copyright 2021 gRPC authors.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
18 
20 
23 
24 namespace grpc_core {
25 namespace {
26 
27 void* ServerConfigSelectorProviderArgCopy(void* p) {
28  ServerConfigSelectorProvider* arg =
29  static_cast<ServerConfigSelectorProvider*>(p);
30  return arg->Ref().release();
31 }
32 
33 void ServerConfigSelectorProviderArgDestroy(void* p) {
34  ServerConfigSelectorProvider* arg =
35  static_cast<ServerConfigSelectorProvider*>(p);
36  arg->Unref();
37 }
38 
39 int ServerConfigSelectorProviderArgCmp(void* p, void* q) {
40  return QsortCompare(p, q);
41 }
42 
43 const grpc_arg_pointer_vtable kChannelArgVtable = {
44  ServerConfigSelectorProviderArgCopy, ServerConfigSelectorProviderArgDestroy,
45  ServerConfigSelectorProviderArgCmp};
46 
47 const char* kServerConfigSelectorProviderChannelArgName =
48  "grpc.internal.server_config_selector_provider";
49 
50 } // namespace
51 
54  const_cast<char*>(kServerConfigSelectorProviderChannelArgName),
55  const_cast<ServerConfigSelectorProvider*>(this), &kChannelArgVtable);
56 }
57 
59  return kServerConfigSelectorProviderChannelArgName;
60 }
61 
62 } // namespace grpc_core
grpc_core::ServerConfigSelectorProvider
Definition: server_config_selector.h:57
grpc_arg
Definition: grpc_types.h:103
grpc_core
Definition: call_metric_recorder.h:31
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
useful.h
xds_manager.p
p
Definition: xds_manager.py:60
grpc_arg_pointer_vtable
Definition: grpc_types.h:85
server_config_selector.h
grpc_core::ServerConfigSelectorProvider::MakeChannelArg
grpc_arg MakeChannelArg() const
Definition: server_config_selector.cc:52
arg
Definition: cmdline.cc:40
grpc_core::QsortCompare
int QsortCompare(const T &a, const T &b)
Definition: useful.h:95
channel_args.h
grpc_channel_arg_pointer_create
grpc_arg grpc_channel_arg_pointer_create(char *name, void *value, const grpc_arg_pointer_vtable *vtable)
Definition: channel_args.cc:492
grpc_core::ServerConfigSelectorProvider::ChannelArgName
static absl::string_view ChannelArgName()
Definition: server_config_selector.cc:58
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:17