Sha256: ccf5c246a0a2a7b251f0cd5431adfb5661cc10bdc57779b5df3a09b0735ed3ef

Contents?: true

Size: 958 Bytes

Versions: 20

Compression:

Stored size: 958 Bytes

Contents

# frozen_string_literal: true
# Resolve a service using settings. This is the default resolver if none of the
# other resolvers find a functional connection.
#
# @api public
class Puppet::HTTP::Resolver::Settings < Puppet::HTTP::Resolver

  # Resolve a service using the default server and port settings for this service.
  #
  # @param [Puppet::HTTP::Session] session
  # @param [Symbol] name the name of the service to be resolved
  # @param [Puppet::SSL::SSLContext] ssl_context
  # @param [Proc] canceled_handler optional callback allowing a resolver
  #   to cancel resolution.
  #
  # @return [Puppet::HTTP::Service] if the service successfully connects,
  #   return it. Otherwise, return nil.
  #
  # @api public
  def resolve(session, name, ssl_context: nil, canceled_handler: nil)
    service = Puppet::HTTP::Service.create_service(@client, session, name)
    check_connection?(session, service, ssl_context: ssl_context) ? service : nil
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/http/resolver/settings.rb
puppet-8.3.0-x86-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.3.0-x64-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.3.0-universal-darwin lib/puppet/http/resolver/settings.rb
puppet-8.3.1 lib/puppet/http/resolver/settings.rb
puppet-8.3.1-x86-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.3.1-x64-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.3.1-universal-darwin lib/puppet/http/resolver/settings.rb
puppet-8.2.0 lib/puppet/http/resolver/settings.rb
puppet-8.2.0-x86-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.2.0-x64-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.2.0-universal-darwin lib/puppet/http/resolver/settings.rb
puppet-8.1.0 lib/puppet/http/resolver/settings.rb
puppet-8.1.0-x86-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.1.0-x64-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.1.0-universal-darwin lib/puppet/http/resolver/settings.rb
puppet-8.0.1 lib/puppet/http/resolver/settings.rb
puppet-8.0.1-x86-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.0.1-x64-mingw32 lib/puppet/http/resolver/settings.rb
puppet-8.0.1-universal-darwin lib/puppet/http/resolver/settings.rb