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
ext
filters
client_channel
connector.h
Go to the documentation of this file.
1
//
2
// Copyright 2015 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
17
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H
18
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H
19
20
#include <
grpc/support/port_platform.h
>
21
22
#include <
grpc/impl/codegen/grpc_types.h
>
23
24
#include "
src/core/lib/channel/channelz.h
"
25
#include "
src/core/lib/gprpp/orphanable.h
"
26
#include "
src/core/lib/gprpp/ref_counted_ptr.h
"
27
#include "
src/core/lib/gprpp/time.h
"
28
#include "
src/core/lib/iomgr/closure.h
"
29
#include "
src/core/lib/iomgr/error.h
"
30
#include "
src/core/lib/iomgr/iomgr_fwd.h
"
31
#include "
src/core/lib/iomgr/resolved_address.h
"
32
#include "
src/core/lib/transport/transport_fwd.h
"
33
34
namespace
grpc_core
{
35
36
// Interface for connection-establishment functionality.
37
// Each transport that supports client channels (e.g., not inproc) must
38
// supply an implementation of this.
39
class
SubchannelConnector
:
public
InternallyRefCounted
<SubchannelConnector> {
40
public
:
41
struct
Args
{
42
// Address to connect to.
43
grpc_resolved_address
*
address
;
44
// Set of pollsets interested in this connection.
45
grpc_pollset_set
*
interested_parties
;
46
// Deadline for connection.
47
Timestamp
deadline
;
48
// Channel args to be passed to handshakers and transport.
49
const
grpc_channel_args
*
channel_args
;
50
};
51
52
struct
Result
{
53
// The connected transport.
54
grpc_transport
*
transport
=
nullptr
;
55
// Channel args to be passed to filters.
56
const
grpc_channel_args
*
channel_args
=
nullptr
;
57
// Channelz socket node of the connected transport, if any.
58
RefCountedPtr<channelz::SocketNode>
socket_node
;
59
60
void
Reset
() {
61
transport
=
nullptr
;
62
channel_args
=
nullptr
;
63
socket_node
.reset();
64
}
65
};
66
67
// Attempts to connect.
68
// When complete, populates *result and invokes notify.
69
// Only one connection attempt may be in progress at any one time.
70
virtual
void
Connect
(
const
Args
&
args
,
Result
*
result
,
71
grpc_closure
* notify) = 0;
72
73
// Cancels any in-flight connection attempt and shuts down the
74
// connector.
75
virtual
void
Shutdown
(
grpc_error_handle
error
) = 0;
76
77
void
Orphan
()
override
{
78
Shutdown
(
GRPC_ERROR_CREATE_FROM_STATIC_STRING
(
"Subchannel disconnected"
));
79
Unref
();
80
}
81
};
82
83
}
// namespace grpc_core
84
85
#endif // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONNECTOR_H
grpc_core::SubchannelConnector::Args
Definition:
connector.h:41
_gevent_test_main.result
result
Definition:
_gevent_test_main.py:96
orphanable.h
grpc_core::SubchannelConnector::Orphan
void Orphan() override
Definition:
connector.h:77
grpc_core::InternallyRefCounted< SubchannelConnector >::Unref
void Unref()
Definition:
orphanable.h:100
grpc_core
Definition:
call_metric_recorder.h:31
grpc_core::SubchannelConnector
Definition:
connector.h:39
grpc_pollset_set
struct grpc_pollset_set grpc_pollset_set
Definition:
iomgr_fwd.h:23
grpc_core::SubchannelConnector::Shutdown
virtual void Shutdown(grpc_error_handle error)=0
grpc_core::Timestamp
Definition:
src/core/lib/gprpp/time.h:62
error
grpc_error_handle error
Definition:
retry_filter.cc:499
grpc_resolved_address
Definition:
resolved_address.h:34
closure.h
resolved_address.h
channelz.h
grpc_channel_args
Definition:
grpc_types.h:132
grpc_core::SubchannelConnector::Args::interested_parties
grpc_pollset_set * interested_parties
Definition:
connector.h:45
grpc_types.h
grpc_core::SubchannelConnector::Result::transport
grpc_transport * transport
Definition:
connector.h:54
asyncio_get_stats.args
args
Definition:
asyncio_get_stats.py:40
grpc_core::SubchannelConnector::Args::channel_args
const grpc_channel_args * channel_args
Definition:
connector.h:49
grpc_core::RefCountedPtr
Definition:
ref_counted_ptr.h:35
hpack_encoder_fixtures::Args
Args({0, 16384})
re2::Result
TestInstance::Result Result
Definition:
bloaty/third_party/re2/re2/testing/tester.cc:96
time.h
error.h
grpc_core::InternallyRefCounted
Definition:
orphanable.h:73
grpc_core::SubchannelConnector::Result::Reset
void Reset()
Definition:
connector.h:60
grpc_core::SubchannelConnector::Result::socket_node
RefCountedPtr< channelz::SocketNode > socket_node
Definition:
connector.h:58
grpc_core::SubchannelConnector::Result
Definition:
connector.h:52
transport_fwd.h
grpc_core::SubchannelConnector::Result::channel_args
const grpc_channel_args * channel_args
Definition:
connector.h:56
grpc_core::SubchannelConnector::Connect
virtual void Connect(const Args &args, Result *result, grpc_closure *notify)=0
GRPC_ERROR_CREATE_FROM_STATIC_STRING
#define GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc)
Definition:
error.h:291
grpc_core::SubchannelConnector::Args::deadline
Timestamp deadline
Definition:
connector.h:47
ref_counted_ptr.h
grpc_transport
Definition:
transport_impl.h:89
iomgr_fwd.h
grpc_error
Definition:
error_internal.h:42
grpc_closure
Definition:
closure.h:56
grpc_core::SubchannelConnector::Args::address
grpc_resolved_address * address
Definition:
connector.h:43
port_platform.h
grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:54