Class: Puppet::Network::HTTP::NoCachePool Private

Inherits:
Object
  • Object
show all
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

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

#closeObject

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.

Yield Parameters:

  • http (Net::HTTP)

    An 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