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
test
core
util
mock_authorization_endpoint.h
Go to the documentation of this file.
1
// Copyright 2021 gRPC authors.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef GRPC_TEST_CORE_UTIL_MOCK_AUTHORIZATION_ENDPOINT_H
16
#define GRPC_TEST_CORE_UTIL_MOCK_AUTHORIZATION_ENDPOINT_H
17
18
#include <
grpc/support/port_platform.h
>
19
20
#include "
src/core/lib/iomgr/endpoint.h
"
21
22
namespace
grpc_core
{
23
24
class
MockAuthorizationEndpoint
:
public
grpc_endpoint
{
25
public
:
26
MockAuthorizationEndpoint
(
absl::string_view
local_uri,
27
absl::string_view
peer_uri)
28
:
local_address_
(local_uri),
peer_address_
(peer_uri) {
29
static
constexpr
grpc_endpoint_vtable
vtable
= {
30
nullptr
,
nullptr
,
nullptr
,
nullptr
,
nullptr
,
nullptr
,
31
nullptr
,
GetPeer
,
GetLocalAddress
,
nullptr
,
nullptr
};
32
grpc_endpoint::vtable
= &
vtable
;
33
}
34
35
static
absl::string_view
GetPeer
(
grpc_endpoint
* ep) {
36
MockAuthorizationEndpoint
*
m
=
37
reinterpret_cast<
MockAuthorizationEndpoint
*
>
(ep);
38
return
m
->peer_address_;
39
}
40
41
static
absl::string_view
GetLocalAddress
(
grpc_endpoint
* ep) {
42
MockAuthorizationEndpoint
*
m
=
43
reinterpret_cast<
MockAuthorizationEndpoint
*
>
(ep);
44
return
m
->local_address_;
45
}
46
47
void
SetPeer
(
absl::string_view
peer_address) {
48
peer_address_
=
std::string
(peer_address);
49
}
50
51
void
SetLocalAddress
(
absl::string_view
local_address) {
52
local_address_
=
std::string
(local_address);
53
}
54
55
private
:
56
std::string
local_address_
;
57
std::string
peer_address_
;
58
};
59
60
}
// namespace grpc_core
61
62
#endif // GRPC_TEST_CORE_UTIL_MOCK_AUTHORIZATION_ENDPOINT_H
grpc_core::MockAuthorizationEndpoint::local_address_
std::string local_address_
Definition:
mock_authorization_endpoint.h:56
grpc_endpoint_vtable
Definition:
endpoint.h:39
grpc_core
Definition:
call_metric_recorder.h:31
absl::string_view
Definition:
abseil-cpp/absl/strings/string_view.h:167
grpc_endpoint::vtable
const grpc_endpoint_vtable * vtable
Definition:
endpoint.h:106
testing::internal::string
::std::string string
Definition:
bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
grpc_core::MockAuthorizationEndpoint
Definition:
mock_authorization_endpoint.h:24
grpc_core::MockAuthorizationEndpoint::GetPeer
static absl::string_view GetPeer(grpc_endpoint *ep)
Definition:
mock_authorization_endpoint.h:35
grpc_core::MockAuthorizationEndpoint::SetLocalAddress
void SetLocalAddress(absl::string_view local_address)
Definition:
mock_authorization_endpoint.h:51
endpoint.h
grpc_core::MockAuthorizationEndpoint::peer_address_
std::string peer_address_
Definition:
mock_authorization_endpoint.h:57
regress.m
m
Definition:
regress/regress.py:25
grpc_core::MockAuthorizationEndpoint::MockAuthorizationEndpoint
MockAuthorizationEndpoint(absl::string_view local_uri, absl::string_view peer_uri)
Definition:
mock_authorization_endpoint.h:26
grpc_endpoint
Definition:
endpoint.h:105
grpc_core::MockAuthorizationEndpoint::GetLocalAddress
static absl::string_view GetLocalAddress(grpc_endpoint *ep)
Definition:
mock_authorization_endpoint.h:41
grpc_core::MockAuthorizationEndpoint::SetPeer
void SetPeer(absl::string_view peer_address)
Definition:
mock_authorization_endpoint.h:47
port_platform.h
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:40