iomgr/event_engine/resolver.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_LIB_IOMGR_EVENT_ENGINE_RESOLVER_H
18 #define GRPC_CORE_LIB_IOMGR_EVENT_ENGINE_RESOLVER_H
19 
21 
22 #include <string.h>
23 #include <sys/types.h>
24 
25 #include <functional>
26 
27 #include <grpc/support/alloc.h>
28 #include <grpc/support/log.h>
30 #include <grpc/support/time.h>
31 
34 
35 namespace grpc_core {
36 namespace experimental {
37 
38 #ifdef GRPC_USE_EVENT_ENGINE
39 class EventEngineDNSResolver : public DNSResolver {
40  public:
41  // Gets the singleton instance, creating it first if it doesn't exist
42  static EventEngineDNSResolver* GetOrCreate();
43 
46  grpc_pollset_set* interested_parties,
47  std::function<void(absl::StatusOr<std::vector<grpc_resolved_address>>)>
48  on_done) override;
49 
51  absl::string_view name, absl::string_view default_port) override;
52 };
53 #endif // GRPC_USE_EVENT_ENGINE
54 
55 } // namespace experimental
56 } // namespace grpc_core
57 
58 #endif // GRPC_CORE_LIB_IOMGR_EVENT_ENGINE_RESOLVER_H
log.h
grpc_core
Definition: call_metric_recorder.h:31
grpc_pollset_set
struct grpc_pollset_set grpc_pollset_set
Definition: iomgr_fwd.h:23
grpc_core::DNSResolver
Definition: resolve_address.h:42
string.h
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
resolve_address.h
setup.name
name
Definition: setup.py:542
time.h
string_util.h
port.h
alloc.h
grpc_core::OrphanablePtr
std::unique_ptr< T, Deleter > OrphanablePtr
Definition: orphanable.h:64
absl::StatusOr
Definition: abseil-cpp/absl/status/statusor.h:187
function
std::function< bool(GrpcTool *, int, const char **, const CliCredentials &, GrpcToolOutputCallback)> function
Definition: grpc_tool.cc:250
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 03:00:04