#include <polling_resolver.h>

Public Member Functions | |
| PollingResolver (ResolverArgs args, const grpc_channel_args *channel_args, Duration min_time_between_resolutions, BackOff::Options backoff_options, TraceFlag *tracer) | |
| void | RequestReresolutionLocked () override |
| void | ResetBackoffLocked () override |
| void | ShutdownLocked () override |
| Shuts down the resolver. More... | |
| void | StartLocked () override |
| Starts resolving. More... | |
| ~PollingResolver () override | |
Public Member Functions inherited from grpc_core::Resolver | |
| Resolver & | operator= (const Resolver &)=delete |
| void | Orphan () override |
| Resolver (const Resolver &)=delete | |
| ~Resolver () override=default | |
Public Member Functions inherited from grpc_core::InternallyRefCounted< Resolver > | |
| InternallyRefCounted (const InternallyRefCounted &)=delete | |
| InternallyRefCounted & | operator= (const InternallyRefCounted &)=delete |
Public Member Functions inherited from grpc_core::Orphanable | |
| Orphanable & | operator= (const Orphanable &)=delete |
| Orphanable (const Orphanable &)=delete | |
Protected Member Functions | |
| const std::string & | authority () const |
| const grpc_channel_args * | channel_args () const |
| grpc_pollset_set * | interested_parties () const |
| const std::string & | name_to_resolve () const |
| void | OnRequestComplete (Result result) |
| virtual OrphanablePtr< Orphanable > | StartRequest ()=0 |
Protected Member Functions inherited from grpc_core::Resolver | |
| Resolver () | |
Protected Member Functions inherited from grpc_core::InternallyRefCounted< Resolver > | |
| InternallyRefCounted (const char *trace=nullptr, intptr_t initial_refcount=1) | |
| RefCountedPtr< Resolver > | Ref () GRPC_MUST_USE_RESULT |
| RefCountedPtr< Resolver > | Ref (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT |
| void | Unref () |
| void | Unref (const DebugLocation &location, const char *reason) |
| ~InternallyRefCounted () override=default | |
Protected Member Functions inherited from grpc_core::Orphanable | |
| Orphanable () | |
| virtual | ~Orphanable () |
Private Member Functions | |
| void | MaybeStartResolvingLocked () |
| void | OnNextResolutionLocked (grpc_error_handle error) |
| void | OnRequestCompleteLocked (Result result) |
| void | StartResolvingLocked () |
Static Private Member Functions | |
| static void | OnNextResolution (void *arg, grpc_error_handle error) |
Private Attributes | |
| std::string | authority_ |
| authority More... | |
| BackOff | backoff_ |
| retry backoff state More... | |
| const grpc_channel_args * | channel_args_ = nullptr |
| channel args More... | |
| bool | have_next_resolution_timer_ = false |
| next resolution timer More... | |
| grpc_pollset_set * | interested_parties_ = nullptr |
| pollset_set to drive the name resolution process More... | |
| absl::optional< Timestamp > | last_resolution_timestamp_ |
| timestamp of last DNS request More... | |
| Duration | min_time_between_resolutions_ |
| min time between DNS requests More... | |
| std::string | name_to_resolve_ |
| name to resolve More... | |
| grpc_timer | next_resolution_timer_ |
| grpc_closure | on_next_resolution_ |
| OrphanablePtr< Orphanable > | request_ |
| are we currently resolving? More... | |
| std::unique_ptr< ResultHandler > | result_handler_ |
| bool | shutdown_ = false |
| are we shutting down? More... | |
| TraceFlag * | tracer_ |
| std::shared_ptr< WorkSerializer > | work_serializer_ |
Definition at line 46 of file polling_resolver.h.
| grpc_core::PollingResolver::PollingResolver | ( | ResolverArgs | args, |
| const grpc_channel_args * | channel_args, | ||
| Duration | min_time_between_resolutions, | ||
| BackOff::Options | backoff_options, | ||
| TraceFlag * | tracer | ||
| ) |
Definition at line 43 of file polling_resolver.cc.
|
override |
Definition at line 62 of file polling_resolver.cc.
|
inlineprotected |
Definition at line 70 of file polling_resolver.h.
|
inlineprotected |
Definition at line 73 of file polling_resolver.h.
|
inlineprotected |
Definition at line 72 of file polling_resolver.h.
|
private |
Definition at line 168 of file polling_resolver.cc.
|
inlineprotected |
Definition at line 71 of file polling_resolver.h.
|
staticprivate |
Definition at line 95 of file polling_resolver.cc.
|
private |
Definition at line 102 of file polling_resolver.cc.
|
protected |
Definition at line 117 of file polling_resolver.cc.
|
private |
Definition at line 124 of file polling_resolver.cc.
|
overridevirtual |
Asks the resolver to obtain an updated resolver result, if applicable.
This is useful for pull-based implementations to decide when to re-resolve. However, the implementation is not required to re-resolve immediately upon receiving this call; it may instead elect to delay based on some configured minimum time between queries, to avoid hammering the name service with queries.
For push-based implementations, this may be a no-op.
Note: Implementations must not invoke any method on the ResultHandler from within this call.
Reimplemented from grpc_core::Resolver.
Definition at line 71 of file polling_resolver.cc.
|
overridevirtual |
Resets the re-resolution backoff, if any. This needs to be implemented only by pull-based implementations; for push-based implementations, it will be a no-op.
Reimplemented from grpc_core::Resolver.
Definition at line 77 of file polling_resolver.cc.
|
overridevirtual |
Shuts down the resolver.
Implements grpc_core::Resolver.
Definition at line 84 of file polling_resolver.cc.
|
overridevirtual |
Starts resolving.
Implements grpc_core::Resolver.
Definition at line 69 of file polling_resolver.cc.
|
protectedpure virtual |
|
private |
Definition at line 204 of file polling_resolver.cc.
|
private |
authority
Definition at line 85 of file polling_resolver.h.
|
private |
retry backoff state
Definition at line 108 of file polling_resolver.h.
|
private |
channel args
Definition at line 89 of file polling_resolver.h.
next resolution timer
Definition at line 100 of file polling_resolver.h.
|
private |
pollset_set to drive the name resolution process
Definition at line 94 of file polling_resolver.h.
|
private |
timestamp of last DNS request
Definition at line 106 of file polling_resolver.h.
|
private |
min time between DNS requests
Definition at line 104 of file polling_resolver.h.
|
private |
name to resolve
Definition at line 87 of file polling_resolver.h.
|
private |
Definition at line 101 of file polling_resolver.h.
|
private |
Definition at line 102 of file polling_resolver.h.
|
private |
are we currently resolving?
Definition at line 98 of file polling_resolver.h.
|
private |
Definition at line 91 of file polling_resolver.h.
are we shutting down?
Definition at line 96 of file polling_resolver.h.
|
private |
Definition at line 92 of file polling_resolver.h.
|
private |
Definition at line 90 of file polling_resolver.h.