Class: Puppet::Network::HTTP::NoCachePool Private
- Defined in:
- lib/puppet/network/http/nocache_pool.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A pool that does not cache HTTP connections.
Instance Method Summary collapse
- #close ⇒ Object private
-
#initialize(factory = Puppet::Network::HTTP::Factory.new) ⇒ NoCachePool
constructor
private
A new instance of NoCachePool.
-
#with_connection(site, verify) {|http| ... } ⇒ Object
private
Yields a
Net::HTTP
connection.
Constructor Details
#initialize(factory = Puppet::Network::HTTP::Factory.new) ⇒ NoCachePool
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of NoCachePool.
5 6 7 |
# File 'lib/puppet/network/http/nocache_pool.rb', line 5 def initialize(factory = Puppet::Network::HTTP::Factory.new) @factory = factory end |
Instance Method Details
#close ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/puppet/network/http/nocache_pool.rb', line 18 def close # do nothing end |
#with_connection(site, verify) {|http| ... } ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Yields a Net::HTTP
connection.
12 13 14 15 16 |
# File 'lib/puppet/network/http/nocache_pool.rb', line 12 def with_connection(site, verify, &block) http = @factory.create_connection(site) verify.setup_connection(http) yield http end |