Class: Aikido::Zen::Collector::Hosts Private
- Inherits:
-
Aikido::Zen::CappedMap
- Object
- Aikido::Zen::CappedMap
- Aikido::Zen::Collector::Hosts
- Defined in:
- lib/aikido/zen/collector/hosts.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.
Keeps track of the hostnames to which the app has made outbound HTTP requests.
Instance Attribute Summary
Attributes inherited from Aikido::Zen::CappedMap
Instance Method Summary collapse
- #add(host) ⇒ void private
- #as_json ⇒ Object private
- #each(&blk) ⇒ Object private
-
#initialize(config = Aikido::Zen.config) ⇒ Hosts
constructor
private
A new instance of Hosts.
Methods inherited from Aikido::Zen::CappedMap
Constructor Details
#initialize(config = Aikido::Zen.config) ⇒ Hosts
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 Hosts.
11 12 13 |
# File 'lib/aikido/zen/collector/hosts.rb', line 11 def initialize(config = Aikido::Zen.config) super(config.max_outbound_connections) end |
Instance Method Details
#add(host) ⇒ void
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.
This method returns an undefined value.
17 18 19 20 |
# File 'lib/aikido/zen/collector/hosts.rb', line 17 def add(host) self[host] ||= host self[host].hit end |
#as_json ⇒ 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.
26 27 28 |
# File 'lib/aikido/zen/collector/hosts.rb', line 26 def as_json map(&:as_json) end |
#each(&blk) ⇒ 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.
22 23 24 |
# File 'lib/aikido/zen/collector/hosts.rb', line 22 def each(&blk) each_value(&blk) end |