grpc
test
core
event_engine
test_init.cc
Go to the documentation of this file.
1
// Copyright 2022 The 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
#include <
grpc/support/port_platform.h
>
15
16
#include "
test/core/event_engine/test_init.h
"
17
18
#include "absl/strings/str_cat.h"
19
20
#include <
grpc/support/log.h
>
21
22
namespace
grpc_event_engine
{
23
namespace
experimental {
24
28
absl::Status
InitializeTestingEventEngineFactory
(
absl::string_view
engine) {
29
if
(engine ==
"default"
|| engine.
empty
()) {
30
// No-op, the default will be used
31
return
absl::OkStatus
();
32
}
33
return
absl::InvalidArgumentError
(
34
absl::StrCat
(
"Unknown EventEngine implementation: "
, engine));
35
}
36
37
}
// namespace experimental
38
}
// namespace grpc_event_engine
absl::InvalidArgumentError
Status InvalidArgumentError(absl::string_view message)
Definition:
third_party/abseil-cpp/absl/status/status.cc:351
log.h
test_init.h
absl::StrCat
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
Definition:
abseil-cpp/absl/strings/str_cat.cc:98
grpc_event_engine::experimental::InitializeTestingEventEngineFactory
absl::Status InitializeTestingEventEngineFactory(absl::string_view engine)
Definition:
test_init.cc:28
absl::string_view
Definition:
abseil-cpp/absl/strings/string_view.h:167
absl::OkStatus
Status OkStatus()
Definition:
third_party/abseil-cpp/absl/status/status.h:882
absl::Status
Definition:
third_party/abseil-cpp/absl/status/status.h:424
grpc_event_engine
Definition:
endpoint_config.h:24
absl::string_view::empty
constexpr bool empty() const noexcept
Definition:
abseil-cpp/absl/strings/string_view.h:292
port_platform.h
grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:28