Class: PuppetX::Relay::Agent::Context
- Inherits:
- 
      Object
      
        - Object
- PuppetX::Relay::Agent::Context
 
- Defined in:
- lib/puppet_x/relay/agent/context.rb
Instance Attribute Summary collapse
- #settings ⇒ Util::Settings readonly
Instance Method Summary collapse
- #backend ⇒ Backend::Base
- 
  
    
      #initialize(settings)  ⇒ Context 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Context. 
- #relay_api ⇒ Util::HTTP::RelayAPI
Constructor Details
#initialize(settings) ⇒ Context
Returns a new instance of Context.
| 13 14 15 | # File 'lib/puppet_x/relay/agent/context.rb', line 13 def initialize(settings) @settings = settings end | 
Instance Attribute Details
#settings ⇒ Util::Settings (readonly)
| 10 11 12 | # File 'lib/puppet_x/relay/agent/context.rb', line 10 def settings @settings end | 
Instance Method Details
#backend ⇒ Backend::Base
| 23 24 25 | # File 'lib/puppet_x/relay/agent/context.rb', line 23 def backend Backend.new_for_configuration(settings[:backend], relay_api, settings) end | 
#relay_api ⇒ Util::HTTP::RelayAPI
| 18 19 20 | # File 'lib/puppet_x/relay/agent/context.rb', line 18 def relay_api Util::HTTP::RelayAPI.new(settings[:relay_api_url], settings[:relay_connection_token], settings) end |