Class: Logglier::Client::HTTP
- Inherits:
-
Object
- Object
- Logglier::Client::HTTP
- Includes:
- InstanceMethods
- Defined in:
- lib/logglier/client/http.rb,
lib/logglier/client/http/sync.rb,
lib/logglier/client/http/threaded.rb
Defined Under Namespace
Classes: DeliveryThread, DeliveryThreadManager, NetHTTPProxy
Instance Attribute Summary collapse
-
#deliverer ⇒ Object
readonly
Returns the value of attribute deliverer.
-
#input_uri ⇒ Object
readonly
Returns the value of attribute input_uri.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(opts = {}) ⇒ HTTP
constructor
A new instance of HTTP.
- #write(message) ⇒ Object
Methods included from InstanceMethods
#formatter, #masher, #masherize_key, #massage_message, #setup_input_uri
Constructor Details
#initialize(opts = {}) ⇒ HTTP
Returns a new instance of HTTP.
13 14 15 16 17 18 19 20 21 |
# File 'lib/logglier/client/http.rb', line 13 def initialize(opts={}) setup_input_uri(opts) @format = opts[:format] ? opts[:format].to_sym : nil @deliverer = if opts[:threaded] Logglier::Client::HTTP::DeliveryThreadManager.new(@input_uri, opts) else Logglier::Client::HTTP::NetHTTPProxy.new(@input_uri, opts) end end |
Instance Attribute Details
#deliverer ⇒ Object (readonly)
Returns the value of attribute deliverer.
11 12 13 |
# File 'lib/logglier/client/http.rb', line 11 def deliverer @deliverer end |
#input_uri ⇒ Object (readonly)
Returns the value of attribute input_uri.
11 12 13 |
# File 'lib/logglier/client/http.rb', line 11 def input_uri @input_uri end |
Instance Method Details
#close ⇒ Object
27 28 29 |
# File 'lib/logglier/client/http.rb', line 27 def close nil end |
#write(message) ⇒ Object
23 24 25 |
# File 'lib/logglier/client/http.rb', line 23 def write() @deliverer.deliver() end |