Class: Invoker::Power::DNS
- Inherits:
-
RubyDNS::Server
- Object
- RubyDNS::Server
- Invoker::Power::DNS
- Defined in:
- lib/invoker/power/dns.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ DNS
constructor
A new instance of DNS.
- #process(name, resource_class, transaction) ⇒ Object
Constructor Details
#initialize ⇒ DNS
Returns a new instance of DNS.
14 15 16 17 |
# File 'lib/invoker/power/dns.rb', line 14 def initialize @logger = ::Logger.new($stderr) @logger.level = ::Logger::FATAL end |
Class Method Details
.server_ports ⇒ Object
7 8 9 10 11 12 |
# File 'lib/invoker/power/dns.rb', line 7 def self.server_ports [ [:udp, '127.0.0.1', Invoker.config.dns_port], [:tcp, '127.0.0.1', Invoker.config.dns_port] ] end |
Instance Method Details
#process(name, resource_class, transaction) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/invoker/power/dns.rb', line 19 def process(name, resource_class, transaction) if name_matches?(name) && resource_class_matches?(resource_class) transaction.respond!("127.0.0.1") else transaction.fail!(:NXDomain) end end |