403Webshell
Server IP : 66.29.132.122  /  Your IP : 3.133.142.2
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet//runtime.rb
require_relative '../puppet/http'
require_relative '../puppet/facter_impl'
require 'singleton'

# Provides access to runtime implementations.
#
# @api private
class Puppet::Runtime
  include Singleton

  def initialize
    @runtime_services = {
      http: proc do
        klass = Puppet::Network::HttpPool.http_client_class
        if klass == Puppet::Network::HTTP::Connection
          Puppet::HTTP::Client.new
        else
          Puppet::HTTP::ExternalClient.new(klass)
        end
      end,
      facter: proc { Puppet::FacterImpl.new }
    }
  end
  private :initialize

  # Loads all runtime implementations.
  #
  # @return Array[Symbol] the names of loaded implementations
  # @api private
  def load_services
    @runtime_services.keys.each { |key| self[key] }
  end

  # Get a runtime implementation.
  #
  # @param name [Symbol] the name of the implementation
  # @return [Object] the runtime implementation
  # @api private
  def [](name)
    service = @runtime_services[name]
    raise ArgumentError, "Unknown service #{name}" unless service

    if service.is_a?(Proc)
      @runtime_services[name] = service.call
    else
      service
    end
  end

  # Register a runtime implementation.
  #
  # @param name [Symbol] the name of the implementation
  # @param impl [Object] the runtime implementation
  # @api private
  def []=(name, impl)
    @runtime_services[name] = impl
  end

  # Clears all implementations. This is used for testing.
  #
  # @api private
  def clear
    initialize
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit