Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
z
Classes
Class List
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Enumerations
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
grpc
src
core
lib
surface
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
22
#include <
grpc/support/port_platform.h
>
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
30
#include <
grpc/impl/codegen/grpc_types.h
>
31
32
#include "
src/core/lib/channel/channel_args.h
"
33
#include "
src/core/lib/channel/channel_fwd.h
"
34
#include "
src/core/lib/channel/promise_based_filter.h
"
35
#include "
src/core/lib/gprpp/sync.h
"
36
#include "
src/core/lib/iomgr/error.h
"
37
#include "
src/core/lib/promise/arena_promise.h
"
38
#include "
src/core/lib/transport/connectivity_state.h
"
39
#include "
src/core/lib/transport/transport.h
"
40
41
namespace
grpc_core
{
42
// Does NOT take ownership of error.
43
grpc_arg
MakeLameClientErrorArg
(
grpc_error_handle
*
error
);
44
45
// This filter becomes the entire channel stack for a channel that fails to be
46
// created. Every call returns failure.
47
class
LameClientFilter
:
public
ChannelFilter
{
48
public
:
49
static
const
grpc_channel_filter
kFilter
;
50
51
static
absl::StatusOr<LameClientFilter>
Create
(
52
ChannelArgs
args
,
ChannelFilter::Args
filter_args);
53
ArenaPromise<ServerMetadataHandle>
MakeCallPromise
(
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
:
59
explicit
LameClientFilter
(
absl::Status
error
);
60
61
absl::Status
error_
;
62
struct
State
{
63
State
();
64
Mutex
mu
;
65
ConnectivityStateTracker
state_tracker
ABSL_GUARDED_BY
(
mu
);
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