channel_init.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2016 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_CORE_LIB_SURFACE_CHANNEL_INIT_H
20 #define GRPC_CORE_LIB_SURFACE_CHANNEL_INIT_H
21 
23 
24 #include <functional>
25 #include <utility>
26 #include <vector>
27 
30 
31 #define GRPC_CHANNEL_INIT_BUILTIN_PRIORITY 10000
32 
37 
38 namespace grpc_core {
39 
40 class ChannelInit {
41  public:
45 
46  class Builder {
47  public:
59 
63 
64  private:
65  struct Slot {
69  int priority;
70  };
72  };
73 
77 
78  private:
79  std::vector<Stage> slots_[GRPC_NUM_CHANNEL_STACK_TYPES];
80 };
81 
82 } // namespace grpc_core
83 
84 #endif /* GRPC_CORE_LIB_SURFACE_CHANNEL_INIT_H */
grpc_core::ChannelInit::Builder
Definition: channel_init.h:46
grpc_core::ChannelInit::CreateStack
bool CreateStack(ChannelStackBuilder *builder) const
Definition: channel_init.cc:48
priority
int priority
Definition: abseil-cpp/absl/synchronization/internal/graphcycles.cc:286
bool
bool
Definition: setup_once.h:312
grpc_core
Definition: call_metric_recorder.h:31
grpc_core::ChannelInit::Builder::RegisterStage
void RegisterStage(grpc_channel_stack_type type, int priority, Stage stage)
Definition: channel_init.cc:27
grpc_core::ChannelStackBuilder
Definition: channel_stack_builder.h:41
grpc_core::ChannelInit::Stage
std::function< bool(ChannelStackBuilder *builder)> Stage
Definition: channel_init.h:44
GRPC_NUM_CHANNEL_STACK_TYPES
@ GRPC_NUM_CHANNEL_STACK_TYPES
Definition: channel_stack_type.h:38
grpc_core::ChannelInit::Builder::Slot::stage
Stage stage
Definition: channel_init.h:68
profile_analyzer.builder
builder
Definition: profile_analyzer.py:159
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
grpc_core::ChannelInit::Builder::Slot::priority
int priority
Definition: channel_init.h:69
grpc_core::ChannelInit
Definition: channel_init.h:40
channel_stack_type.h
grpc_core::ChannelInit::Builder::Slot::Slot
Slot(Stage stage, int priority)
Definition: channel_init.h:66
grpc_core::ChannelInit::slots_
std::vector< Stage > slots_[GRPC_NUM_CHANNEL_STACK_TYPES]
Definition: channel_init.h:79
std
Definition: grpcpp/impl/codegen/async_unary_call.h:407
grpc_channel_stack_type
grpc_channel_stack_type
Definition: channel_stack_type.h:24
grpc_core::ChannelInit::Builder::slots_
std::vector< Slot > slots_[GRPC_NUM_CHANNEL_STACK_TYPES]
Definition: channel_init.h:71
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
function
std::function< bool(GrpcTool *, int, const char **, const CliCredentials &, GrpcToolOutputCallback)> function
Definition: grpc_tool.cc:250
grpc_core::ChannelInit::Builder::Slot
Definition: channel_init.h:65
channel_stack_builder.h
grpc_core::ChannelInit::Builder::Build
ChannelInit Build()
Definition: channel_init.cc:32
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:44