You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dispatch location lookups to plugins
Summary:
This commit enables DNSRocks to dispatch queries which match PluginMap records to their appropriate Plugins. To support somewhat dynamic plugins, plugins have a "registry" and a "factory" so that no plugin is created for any consumer which does not explicitly opt-in to it.
Included in this commit is the "pinned" plugin, used as an end-to-end example and leveraged in unit tests. It will not be enabled in any production deployment (unless explicitly enabled, if desired for some reason).
Plugins have been given higher precedence than the existing Resolver/ECS-based lookup. If none are enabled, none match the queried domain, or the plugin returns a non-answer, DNSRocks continues through the existing lookup path.
Plugins rely on the `init()` mechanism to register themselves.
Reviewed By: virtyaluk
Differential Revision: D118517414
fbshipit-source-id: 01423e6c96e91001a7bf449ac184608afc77ccb6