resolve_address_posix.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_RESOLVE_ADDRESS_POSIX_H
18 #define GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_POSIX_H
19 
21 
22 #include <functional>
23 
26 
27 namespace grpc_core {
28 
29 // A DNS resolver which uses the native platform's getaddrinfo API.
31  public:
32  // Gets the singleton instance, creating it first if it doesn't exist
34 
37  grpc_pollset_set* /* interested_parties */,
38  std::function<void(absl::StatusOr<std::vector<grpc_resolved_address>>)>
39  on_done) override;
40 
42  absl::string_view name, absl::string_view default_port) override;
43 
44  // NativeDNSResolver does not support cancellation.
45  bool Cancel(TaskHandle handle) override;
46 };
47 
48 } // namespace grpc_core
49 
50 #endif // GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_POSIX_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
absl::string_view
Definition: abseil-cpp/absl/strings/string_view.h:167
resolve_address.h
grpc_core::NativeDNSResolver
Definition: resolve_address_posix.h:30
setup.name
name
Definition: setup.py:542
grpc_core::NativeDNSResolver::ResolveName
TaskHandle ResolveName(absl::string_view name, absl::string_view default_port, grpc_pollset_set *, std::function< void(absl::StatusOr< std::vector< grpc_resolved_address >>)> on_done) override
grpc_event_engine::experimental::EventEngine::DNSResolver::LookupTaskHandle
Task handle for DNS Resolution requests.
Definition: event_engine.h:292
grpc_core::NativeDNSResolver::Cancel
bool Cancel(TaskHandle handle) override
port.h
handle
static csh handle
Definition: test_arm_regression.c:16
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
grpc_core::NativeDNSResolver::ResolveNameBlocking
absl::StatusOr< std::vector< grpc_resolved_address > > ResolveNameBlocking(absl::string_view name, absl::string_view default_port) override
grpc_core::NativeDNSResolver::GetOrCreate
static NativeDNSResolver * GetOrCreate()
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:10