Sha256: 162aa211f7f46659f2c883a282da9583557fc8dc6fb069c8f70b47f236bcd00a

Contents?: true

Size: 444 Bytes

Versions: 8

Compression:

Stored size: 444 Bytes

Contents

class Puppet::HTTP::Resolver::SRV < Puppet::HTTP::Resolver
  def initialize(domain: srv_domain, dns: Resolv::DNS.new)
    @srv_domain = domain
    @delegate = Puppet::Network::Resolver.new(dns)
  end

  def resolve(session, name, &block)
    # This assumes the route name is the same as the DNS SRV name
    @delegate.each_srv_record(@srv_domain, name) do |server, port|
      yield session.create_service(name, server, port)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
puppet-6.11.1 lib/puppet/http/resolver/srv.rb
puppet-6.11.1-x86-mingw32 lib/puppet/http/resolver/srv.rb
puppet-6.11.1-x64-mingw32 lib/puppet/http/resolver/srv.rb
puppet-6.11.1-universal-darwin lib/puppet/http/resolver/srv.rb
puppet-6.11.0 lib/puppet/http/resolver/srv.rb
puppet-6.11.0-x86-mingw32 lib/puppet/http/resolver/srv.rb
puppet-6.11.0-x64-mingw32 lib/puppet/http/resolver/srv.rb
puppet-6.11.0-universal-darwin lib/puppet/http/resolver/srv.rb