lame_client.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_LAME_CLIENT_H
20 #define GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H
21 
23 
24 #include <memory>
25 
26 #include "absl/base/thread_annotations.h"
27 #include "absl/status/status.h"
28 #include "absl/status/statusor.h"
29 
31 
40 
41 namespace grpc_core {
42 // Does NOT take ownership of error.
44 
45 // This filter becomes the entire channel stack for a channel that fails to be
46 // created. Every call returns failure.
48  public:
50 
52  ChannelArgs args, ChannelFilter::Args filter_args);
54  CallArgs call_args, NextPromiseFactory next_promise_factory) override;
55  bool StartTransportOp(grpc_transport_op*) override;
56  bool GetChannelInfo(const grpc_channel_info*) override;
57 
58  private:
60 
62  struct State {
63  State();
66  };
67  std::unique_ptr<State> state_;
68 };
69 } // namespace grpc_core
70 
71 #endif /* GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H */
grpc_arg
Definition: grpc_types.h:103
channel_fwd.h
connectivity_state.h
grpc_core::LameClientFilter::kFilter
static const grpc_channel_filter kFilter
Definition: lame_client.h:49
grpc_core::LameClientFilter::GetChannelInfo
bool GetChannelInfo(const grpc_channel_info *) override
Definition: lame_client.cc:81
grpc_core
Definition: call_metric_recorder.h:31
grpc_core::MakeLameClientErrorArg
grpc_arg MakeLameClientErrorArg(grpc_error_handle *error)
Definition: lame_client.cc:123
error
grpc_error_handle error
Definition: retry_filter.cc:499
promise_based_filter.h
grpc_core::LameClientFilter::state_
std::unique_ptr< State > state_
Definition: lame_client.h:67
grpc_core::LameClientFilter::error_
absl::Status error_
Definition: lame_client.h:61
grpc_transport_op
Definition: transport.h:452
grpc_types.h
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
grpc_core::NextPromiseFactory
std::function< ArenaPromise< ServerMetadataHandle >(CallArgs)> NextPromiseFactory
Definition: transport.h:165
grpc_core::LameClientFilter
Definition: lame_client.h:47
grpc_core::LameClientFilter::State::mu
Mutex mu
Definition: lame_client.h:64
arena_promise.h
grpc_core::CallArgs
Definition: transport.h:159
error.h
grpc_core::LameClientFilter::State::State
State()
Definition: lame_client.cc:73
grpc_core::LameClientFilter::MakeCallPromise
ArenaPromise< ServerMetadataHandle > MakeCallPromise(CallArgs call_args, NextPromiseFactory next_promise_factory) override
Definition: lame_client.cc:76
grpc_core::LameClientFilter::LameClientFilter
LameClientFilter(absl::Status error)
Definition: lame_client.cc:70
grpc_channel_filter
Definition: channel_stack.h:111
grpc_core::ChannelFilter
Definition: promise_based_filter.h:62
grpc_core::Mutex
Definition: src/core/lib/gprpp/sync.h:61
grpc_core::LameClientFilter::StartTransportOp
bool StartTransportOp(grpc_transport_op *) override
Definition: lame_client.cc:83
grpc_core::ArenaPromise
Definition: arena_promise.h:152
absl::Status
Definition: third_party/abseil-cpp/absl/status/status.h:424
grpc_core::ChannelArgs
Definition: channel_args.h:111
transport.h
channel_args.h
absl::StatusOr
Definition: abseil-cpp/absl/status/statusor.h:187
grpc_error
Definition: error_internal.h:42
grpc_core::LameClientFilter::Create
static absl::StatusOr< LameClientFilter > Create(ChannelArgs args, ChannelFilter::Args filter_args)
Definition: lame_client.cc:64
grpc_core::LameClientFilter::State::ABSL_GUARDED_BY
ConnectivityStateTracker state_tracker ABSL_GUARDED_BY(mu)
grpc_core::ConnectivityStateTracker
Definition: src/core/lib/transport/connectivity_state.h:97
grpc_channel_info
Definition: grpc_types.h:720
grpc_core::ChannelFilter::Args
Definition: promise_based_filter.h:64
sync.h
grpc_core::LameClientFilter::State
Definition: lame_client.h:62
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:27